-
保存Bitmap图像
- public void saveFile(Bitmap bm, String fileName) throws IOException {
- String path = getSDPath() +"/revoeye/";
- File dirFile = new File(path);
- if(!dirFile.exists()){
- dirFile.mkdir();
- }
- File myCaptureFile = new File(path + fileName);
- BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(myCaptureFile));
- bm.compress(Bitmap.CompressFormat.JPEG, 80, bos);
- bos.flush();
- bos.close();
- }
-
相关阅读:
接口的上溯造型——《Thinking in Java》随笔015
数据库
小结
异常及String
多态&接口
继承&封装
Java 类 对象 包
Java 方法的应用
Java数组的运用
Java代码运用及算法思路养成——用*号输出形状
-
原文地址:https://www.cnblogs.com/hui413027075/p/6673592.html
Copyright © 2020-2023
润新知