moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

Split image into tiles - Windows, errors, etc... #469

Closed Pavle37 closed 6 years ago

Pavle37 commented 6 years ago

Hello,

I was just starting to use the TileView library and i ran into problems when using the ImageMagick tool. I've followed the documentation provided here but without luck.

Finally after about 2hrs of exhaustive searching on ImageMagick forums, trying to find the right online tool and million other ideas i did it. I just want to share my experience, thoughts and mistakes in hope that i will save somebody the frustration that i've gone through.

Here is the list of things i tried that i think other people will try as well and what's wrong with that:

TLDR;

Easiest way to do split is:

moagrius commented 6 years ago

thanks for the feedback.

you can use any string you want. you don't even have to use a string. it's detailed in the README: https://github.com/moagrius/TileView#tiles. you can supply your own BitmapDecoder to get bitmaps in any way you want to. for the simple change you mentioned, just use the provided BitmapProviderAssets and change the order of the arguments passed it - it's a very straightforward String.format call: https://github.com/moagrius/TileView/blob/master/tileview/src/main/java/com/qozix/tileview/graphics/BitmapProviderAssets.java#L34

next, the code provided for imagemagick certainly does work out of the box, at least with the version of imagemagick around at the time (5+ years ago), and i've used it to create tiles many time. double percent have special significance.

anyway, glad you got it working, maybe documenting your experience will help others in the future

Pavle37 commented 6 years ago

@moagrius Yeah thanks for explaining the library and how i can do that straightforwardly. I also hope it helps somebody, especially with your take on the matter and explanation how they can do that in the library itself :) cheers!