How to get Bitmap from an Uri?

前端 未结 16 1283
时光说笑
时光说笑 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:47

    This is the easiest solution:

    Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);
    

提交回复
热议问题