我的代码是:
public Bitmap loadPhoto(Uri uri) {
Bitmap scaled = null;
try {
scalled = Bitmap.createBitmap(
MediaStore.Images.Media.getBitmap(getContentResolver(), uri),
0,0,90, 90);
if (scaled == null) { return null; }
} catch(Exception e) { }
return scaled;
}
在这之后,我将图像缩放并显示在 ImageView 中。每个图像都来自设备相机。
每次从相机获取三张照片后,我都会出现 内存不足 错误。如何解决?