/**
* 把batmap 转file
* @param bitmap
* @param filepath
*/
public static File saveBitmapFile(Bitmap bitmap, String filepath){
File file=new File(filepath);//将要保存图片的路径
try {
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
bitmap.compress(CompressFormat.JPEG, 100, bos);
bos.flush();
bos.close();
} catch (IOException e) {
e.printStackTrace();
}
return file;
}
MyBitmapUtil.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:GCSApp
作者:
评论列表
文章目录