My project is about image processing in Android. My problem is that when I load a 22MB image in an ImageView I get an OutOfMemoryError.
Error:
java.lang.OutOfMemoryError: Failed to allocate a 244588824 byte allocation with 11397108 free bytes and 79MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
You need resize your image and load subsample to imageview: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html
You can use some lib as Picaso, Glide to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With