Sorry to state the obvious, but since you downloaded the file why don't you downsample only picture that are either :
- Larger than 1024x768 in size - Bigger than 500 KB or a smart mix of the two ? Best regards On 8 fév, 15:48, Samuh <[email protected]> wrote: > I have a bunch of image URLs. I have to download these images and > display them in my application one-by-one. I am saving the images in a > Collection using SoftReferences and also on Sdcard to avoid refetches > and improve user experience. > > The problem is I dont know anything about the size of the bitmaps. And > as it turns out, I am getting OutOfMemoryExceptions sporadically, when > I am using BitmapFactory.decodeStream(InputStream) method. So, I chose > to downsample the images using BitmapFactory Options(sample size=2). > This gave a better output: no OOMs, but this affects the quality of > smaller images. > > How should I handle such cases? Is there a way to selectively down > sample only high resolution images? > > Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

