public static Bitmap getBitmapFromUri(Context context, Uri uri, Options options) {
Bitmap bitmap = null;
InputStream is = null;
try {
is = context.getContentResolver().openInputStream(uri);
bitmap = BitmapFactory.decodeStream(is, null, options);
if (is != null) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
} catch (FileNotFoundException e2) {
e2.printStackTrace();
if (is != null) {
try {
is.close();
} catch (IOException e3) {
e3.printStackTrace();
}
}
} catch (Throwable th) {
if (is != null) {
try {
is.close();
} catch (IOException e32) {
e32.printStackTrace();
}
}
}
return bitmap;
}
MediaStoreUtils.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:boohee_v5.6
作者:
评论列表
文章目录