How to get Bitmap from an Uri?

前端 未结 16 1144
时光说笑
时光说笑 2020-11-22 10:41

How to get a Bitmap object from an Uri (if I succeed to store it in /data/data/MYFOLDER/myimage.png or file///data/data/MYFOLDER/myimage.png) to u

16条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 10:48

    Uri imgUri = data.getData();
    Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imgUri);
    

提交回复
热议问题