Gallo2fire
Gallo2fire

Reputation: 143

Android Out Of Memory error with with images

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.

Upvotes: 1

Views: 3746

Answers (1)

K_Anas
K_Anas

Reputation: 31456

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.

Upvotes: 3

Related Questions