exception - OutofMemoryError: bitmap size exceeds VM budget (Android) -


Exception in the bitmap factory is not sure what the problem is (ok, I can guess this issue, but Not sure why this is happening)

 Error / Android Randomime (7906): java.lang.OutOfMemoryError: Bitmap size is more than VM budget error / AndroidRuntime (7906): Graphics on Android .BitmapFactory.decodeFile (BitmapFactory.javamore95) 

My code is very straight forward, I have an XML layout w / The default image is defined I try to load a BM on the SDCard (if present - this is) if it does not show the default image anyway .. Here is the code:

  public Category increases activity activity (public spaces crate (bundle saved instances) {/ ** Remove menu / status bar ** / Request WindowFeature (Window.FEATURE_NO_TITLE); Last window win = getWindow (); win.setFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLA G_FULLSCREEN); Bitmap bm; Super.onCreate (savedInstanceState); SetContentView (R.layout.showpicture); Try {ImageView mImageButton = (ImageView) findViewById (R.id.displayPicture); BM = bitmap.scent scaledbitmap (bitmapfinder.cdffile ("/ sdcard / dcim / camera / 20091018203339743.jpg"), 100, 100, true); ParkImageButton.setImageBitmap (BM); } Hold (invalid archive pre-ex) {log d. ("MAPP", former. Messages); } Hold (IllegalStateException ex) {  

Does this any idea fail on bm = bitmap.createScaledBitmap ? I did some research on the forum, and it indicated that I do not know why this is not working. Any help would be great! Thanks,

Chris


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -