For some reason I can not load any image that has more than 200 pixels in either width or height without getting a OOM error. To fix this I lowered the amount of pixels on my images but now they all look blurry. Does anyone know the best way to load higher quality images without getting this error. Also I have tried manually recycling my bitmaps but when doing so it seems to just give me the out of memory error no matter what size the images are.
1
-
1are you only loading one of these images (200px) and getting an OOM error? or, are you loading many? are you running in a severely memory constrained environment? (are you using a simulator, or a real phone, and if so, which model ... and how much free memory)Nate– Nate2012-06-22 00:10:16 +00:00Commented Jun 22, 2012 at 0:10
Add a comment
|
1 Answer
The inSampleSize of the BitmapFactory.Options class can solve your issue, Try to see the officiel android docs Loading Large Bitmaps Efficiently and you will get it work.