Closed derekbrameyer closed 10 years ago
Hi derek,
By default, TileView will try to read tiles from assets, but this is easily modified. You'll need to use a custom BitmapDecoder
to read the files from the sd card... I've never done it myself but I know several other users have, and in fact users have successfully read from HTTP, SD card, or even decoded regions of a single large resource file with custom implementations.
The interface is very simple (one method that just has to return a Bitmap) - here's a quick write-up: https://github.com/moagrius/TileView/wiki/Tile-Sources
Post back if you need more help.
Agreed, incredibly easy. BitmapDecoder.decodeBitmap(filePath)
was all I needed. Thanks!
Hi moagrius, thanks for the awesome work on TileView. I've built a script that downloads a large image from the web, uses ImageMagick on Android to slice it up (this takes some time, ~10-15 seconds), and saves the tiles in the external storage directory. I then try to load the tiles like so:
Attaching the debugger shows that
pathToTiles
is "/storage/emulated/0/Android/data/com.myapp.android/files", so it looks like it's pointing to the right directory.Have you ever tried doing this before? Thanks for any help you can provide!