MediaStore.Images.Media.getBitmap and out of memory error

后端 未结 4 931
情歌与酒
情歌与酒 2020-12-08 22:39

My code code is:

public Bitmap loadPhoto(Uri uri) {
    Bitmap scaled = null;
    try {
    scalled = Bitmap.createBitmap(
      MediaStore.Images.Media.getB         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-08 23:02

    Try using BitmapFactory to fix the problem http://developer.android.com/reference/android/graphics/BitmapFactory.html

提交回复
热议问题