我是靠谱客的博主 霸气黄蜂,这篇文章主要介绍bitmap 转为jpg文件_android开发将Bitmap转换成图片保存到sd卡 | 学步园,现在分享给大家,希望可以做个参考。

public void saveMyBitmap(Bitmap mBitmap,String bitName)  {

File f = new File( "/sdcard/Note/"+bitName + ".jpg");

FileOutputStream fOut = null;

try {

fOut = new FileOutputStream(f);

} catch (FileNotFoundException e) {

e.printStackTrace();

}

mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fOut);

try {

fOut.flush();

} catch (IOException e) {

e.printStackTrace();

}

try {

fOut.close();

} catch (IOException e) {

e.printStackTrace();

}

}

最后

以上就是霸气黄蜂最近收集整理的关于bitmap 转为jpg文件_android开发将Bitmap转换成图片保存到sd卡 | 学步园的全部内容,更多相关bitmap内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部