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 }
本文共 381 字,大约阅读时间需要 1 分钟。
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 }
转载于:https://www.cnblogs.com/1925yiyi/p/10413332.html