/**
* 将图片保存在指定路径中
*
* @param bitmap
* @param descPath
*/
public static void saveBitmap(Bitmap bitmap, String descPath) {
File file = new File(descPath);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
if (!file.exists()) {
try {
bitmap.compress(CompressFormat.JPEG, 30, new FileOutputStream(
file));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
if (null != bitmap) {
bitmap.recycle();
bitmap = null;
}
}
BitmapUtils.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:rongyunDemo
作者:
评论列表
文章目录