Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have images stored on sd card(size of each ~ 4MB). I want to resize it, than set it to ImageView. But I cannot do it using
Java
BitmapFactory.decodeFile(path)
becouse Exception
Java
java.lang.OutOfMemoryError
is appeared. How can i resize image without loading it in the memory. Is it real?
Posted

1 solution

Try adding android:largeHeap="true" to your application tag in AndroidManifest.xml and see if that helps (it should let you use more memory), and make sure you release the large version of the file when you're done so the garbage collector can reclaim the memory.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900