New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large images do not load #526
Comments
If you exceed the max texture size of GL the image will silently fail to decode. The various implementations of |
What is the URL here? |
These are local Uri from images taken from the Camera on high res Sony phones. |
What size? format? Picasso command in use? We can't really know what's happening here without some information to try and reproduce or debug. |
Standard call: Picasso.with(context) //
.load(uri) //
.resize(screenWidth, screenHeight) //
.get(); Screen size is 1080 x 1920. |
How big is the image and what format is it in? What device and how much heap does it have? Maybe post a sample image so we can try to reproduce or debug. |
Images are 13 megapixel (I'm pretty sure). JPG format. These are JPG bytes coming straight from void takePicture(ShutterCallback shutter, PictureCallback raw, PictureCallback jpeg) in the Camera class. |
Device? Android version? |
I don't think it matters. I'm actually not sure at this point, I rolled my own code and moved on. We have a ton of Xperia phones lying around. I'm actually too busy babysitting team members right now to dig further into this. |
Would love to help generally. I am closing for now. |
Raw image {w, h} = {3840, 2160} |
Assuming 3840 * 2160 * 4 = 33MB image Switching to
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 |
Shouldn't you just decode the bounds before decoding the final scaled version? This only puts the scaled version into memory. You shouldn't have the full size image in memory if you know the user is scaling. What I mean is, calculate the I rolled my own code and got this working no problem. |
We do that already. |
Gives the impression that you don't. |
Well you didn't really provide a concise description of what you were loading or how so we have to guess at a lot of it. |
I encountered the same problem.when i invoke resize option,big pictures(such as the pictures that the camera captures) will not show |
I'm loading very large images from a local 'Uri' and scaling with
resize()
(also callingskipMemoryCache()
). 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?
The text was updated successfully, but these errors were encountered: