通过url获取bitmap

 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

你可能感兴趣的:(通过url获取bitmap)