Reputation: 93
I searched on the internet but didn't get a solution. How do I get a Bitmap of a Large size image(13 Mb) from the path of an image in the SD card or phone memory?
I use this:
Bitmap b = BitmapFactory.decodeFile(path);
and get an exception on this line
Thanks.
Upvotes: 0
Views: 2724
Reputation: 1
Use android:largeHeap="true" for solve this:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:largeHeap="true"
Upvotes: 0
Reputation: 2272
This has to do with the Java Heap Size.
You can request a larger heap using the manifest on devices that are 2.3 or above.
See this Stack Overflow post for more information.
Upvotes: 1