1  //通过Uri获取BitMap
 2     public static Bitmap getBitmapFromUri(Uri uri,Context context) {
 3         Bitmap bitmap = null;
 4         try {
 5             bitmap= BitmapFactory.decodeFile(uri.toString());
 6           
 7         } catch (Exception e) {
 8             e.printStackTrace();
 9         }
10         return bitmap;
11     }

 

posted on 2019-02-21 16:18  龙从一  阅读(768)  评论(0编辑  收藏  举报