picasso: Large images do not load
I’m loading very large images from a local ‘Uri’ and scaling with resize()
(also calling skipMemoryCache()
). Picasso silently fails. Smaller images load fine with the same code. I was using an older version of Picasso and was seeing OOM logged. I tried the latest version and the problem persists, but the log is now nonexistent.
Can you point me to the code that decodes the Bitmaps?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 17 (5 by maintainers)
Assuming
RGB_8888
(which is default) this is:3840 * 2160 * 4 = 33MB image
Switching to
RGB_555
will be around 8mb but will reduce quality…skipMemoryCache()
has no effect on the decoding. The bitmap will be loaded in memory so it can be displayed. It just wont be stored for future usage or evict other images.It will also allocate intermediately a new bitmap for 1920x1080 for your transformation. Both bitmaps would be in memory for a bit of time until the original is recycled and gc’ed.
You probably need
android:largeHeap=true
in your manifest to load this.If you exceed the max texture size of GL the image will silently fail to decode. The various implementations of
BitmapHunter
to the decoding based on the source.