Loading image in android without bitmap

to go straight to the point I would like to download and show a large image in my android app such a large image -> http://viewhdwall.com/wp-content/uploads/2014/09/Wonderful-Purple-Bridge-Wallpaper .jpg

Loading this large image throws an OutOfMemory exception.

Doing a few calculations, if I load this image into a bitmap using ARGB_8888 it will use as much as 285MB of memory (11658 * 6112 * 4) and there is a lot of memory for the application for that. So my question is, can I load this large image into an image without using a bitmap? In a way that doesn't use that much memory.

To make an example, I opened this large image in Windows PaintBrush and used as much as 700MB of memory, when I opened the large image in Windows Photo Viewer, it used a maximum of 30MB (I'm using Windows 8).

Explanation: Just to clarify, shrinking the image using the "inSampleSize" parameter from BitmapFactory.Options is not an option for me, because if I reduce the size of the image it will no longer be a "large image".

Edit 1

I want the user to be able to enlarge the image if they want, so I cannot lose quality (this will have to do with the reduced dimensions of the image). I know that the device screen itself will do a thumbnail image, but if I use a bitmap I have information about all the details of the image, but that just uses up a lot of memory. Windows Photo Viewer achieves this without consuming a lot of memory.

+3
android memory image bitmap bitmapfactory


source to share


No one has answered this question yet

Check out similar questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1832
Lazy loading images in ListView
1207
Strange memory issue when loading image into Bitmap object
879
How do I convert Drawable to Bitmap?
201
Resize large bitmap to scale output file on Android



All Articles
Loading...
X
Show
Funny
Dev
Pics