0

Possible Duplicate:
Android: Strange out of memory issue while loading an image to a Bitmap object
bitmap size exceeds Vm budget error android

I'm trying to load a big bitmap, about 1500x1000 pixels

InputStream is = mngr.open( "myBitmap.png");
Bitmap bit = BitmapFactory.decodeStream(is)

Making the bitmap smaller or sampling it isn't a good idea, because

  • I need it in its original size.

  • this error happens about 20% of the times, i.e. about 80% times it loads fine.

What do you think would be the best way to solve this? Maybe putting it into a loop, like can't load -> try again ?

Thanks!

Community
  • 1
  • 1
Roger Travis
  • 8,402
  • 18
  • 67
  • 94
  • Please see my answer on following: http://stackoverflow.com/questions/10737582/bitmap-size-exceeds-vm-budget-error-android/10738115#10738115 This should solve your problem. – Shrikant Ballal Jun 14 '12 at 09:08
  • Please see answer of following link: [Out of Memory Error](http://stackoverflow.com/questions/477572/android-strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object/823966#823966) This should solve your problem. – Dipak Keshariya Jun 14 '12 at 09:27
  • Please see my answer on following: http://stackoverflow.com/questions/10737582/bitmap-size-exceeds-vm-budget-error-android/10738115#10738115 This should solve your problem. – Shrikant Ballal Jun 14 '12 at 09:08
  • Please see answer of following link: [Out of Memory Error](http://stackoverflow.com/questions/477572/android-strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object/823966#823966) This should solve your problem. – Dipak Keshariya Jun 14 '12 at 09:27

0 Answers0