android 保存bitmap到SD卡
来源:互联网 发布:java类库手册 pdf 编辑:程序博客网 时间:2024/05/16 09:18
public void saveMyBitmap(String bitName,Bitmap mBitmap){
File f = new File("/sdcard/" + bitName + ".png");
try {
f.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
DebugMessage.put("在保存图片时出错:"+e.toString());
}
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(f);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);
try {
fOut.flush();
} catch (IOException e) {
e.printStackTrace();
}
try {
fOut.close();
} catch (IOException e) {
e.printStackTrace();
}
}
File f = new File("/sdcard/" + bitName + ".png");
try {
f.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
DebugMessage.put("在保存图片时出错:"+e.toString());
}
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(f);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);
try {
fOut.flush();
} catch (IOException e) {
e.printStackTrace();
}
try {
fOut.close();
} catch (IOException e) {
e.printStackTrace();
}
}
0 0
- android 保存bitmap到SD卡
- android 保存bitmap到SD卡
- android保存Bitmap图片到sd卡
- android 保存bitmap到SD卡
- android 保存bitmap到SD卡
- 保存Bitmap到SD卡
- Android中将Bitmap以数组形式保存到SD卡
- android 保存bitmap图片到sd卡中文件夹
- android 保存bitmap到SD卡&nb…
- Bitmap保存到SD
- 把view保存成bitmap,保存bitmap到sd卡
- 将bitmap保存到sd卡
- 将Bitmap保存到SD卡
- android中将bitmap保存到SD卡指定的目录下
- android开发将Bitmap转换成图片保存到sd卡
- Android开发将Bitmap转换成图片保存到sd卡
- Android将Bitmap 以图片形式保存到sd卡中
- Android—将Bitmap图片保存到SD卡目录下或者指定目录
- 位运算总结2:利用位运算实现加法
- Laravel artisan 命令工具
- 服务治理过程演进
- 相册
- Python——类、实例和其他对象的内建函数
- android 保存bitmap到SD卡
- “互联网+”4大新趋势突破企业“寒冬”之困
- 实现WebView的免登陆
- 高性能Java网络框架 MINA
- [转]AFNetWorking3
- C# 读取 Oracle 数据库表的例子 SALE_REPORT
- 为什么安卓没有IOS流畅?看完你就明白了
- 用wireshark抓包分析tcp
- input内的文件水平剧中和垂直居中