1

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
  • 1
    are 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) Commented Jun 22, 2012 at 0:10

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.