Reputation: 85
I need to load several large bitmaps into memory (to be used on screen at the same time, alpha png's).
I've loaded the bitmaps in efficiently using tutorial: (http://developer.android.com/training/displaying-bitmaps/load-bitmap.html)
My problem is, is that my bitmaps (only 3 of them) are going over the 32MB heap limit on high resolution screens. (silly limit).
What can I do now? Is there anyway of loading bitmaps outside the app assigned memory heap or am I stuck here?
Upvotes: 0
Views: 84
Reputation: 4936
try using these decoding options:
options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.RGB_565;
then pass it to BitmapFactory decoder, if your images are displayed without too much artifact you can use 565 color space to save something like half of the memory
Upvotes: 1