tags:

views:

117

answers:

0

I want to display a bitmap read from the SD card at actual pixel size in Android.

I can't assume anything about the bitmap, other than Android supports its image format. The bitmap might be huge.

Seems simple enough, but when you factor Android memory limitations it gets much more complicated.

Any ideas?

Edit: Attempting to load a large bitmap gives an out of memory error because Android is not able to allocate enough memory to decode it. You can load a scaled down version of the bitmap, but this is not useful to show the bitmap at actual pixel size. The question is about how to show a large bitmap on Android while staying within the app's memory constraints (most likely by loading it in chunks).

Edit 2: The bitmap might be huge, but within the realm of reasonable. I'm talking about user images, not HD Nasa pictures.