I am writing an application that receives a list of images from a gallery on a device and then displays them in a GridView. In my adapter, I have the following code (where width and height is the view it will place):
PicassoSingleton.with(mContext).load("file://" + imageUri).resize(getImageWidth(), getImageHeight()).centerInside().placeholder(R.drawable.image_placeholder).error(R.drawable.image_error).into(holder.image);
On most devices, this works very well. However, on some devices where the photos taken are very large (for example, Samsung Galaxy S5-16MP), some images do not load and an error resource is displayed. I do not see any obvious log messages from Picasso debugging, only the following:
D/Picasso(20171): Main errored [R7]+501ms
I assume this is due to memory issues, but I'm not sure how to do this. Can Picasso be said to compress images? Or is there something else I'm missing?
thanks
android picasso
Michael
source share