我没有成功解决这个错误:
java.lang.OutOfMemoryError:位图大小超出 VM 预算。
我的代码是:
BitmapFactory.Options op = new BitmapFactory.Options();
myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath(),op);
ImageView _image = (ImageView)view.findViewById(R.id.imageCarte);
int width = myBitmap.getWidth();
int height = myBitmap.getHeight();
int halfWidth = width/2;
int halfHeight = height/2;
Bitmap bmHalf = Bitmap.createScaledBitmap(myBitmap, halfWidth, halfHeight, false);
_image.setImageBitmap(bmHalf);