public static void saveBitmap(Bitmap bitmap, String storePath) {
Log.e(TAG, "保存图片");
File f = new File(storePath);
if (f.exists()) {
f.delete();
}
try {
FileOutputStream out = new FileOutputStream(f);
bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);
out.flush();
out.close();
Log.i(TAG, "已经保存");
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
android 保存bitmap到本地
最新推荐文章于 2023-04-23 00:19:25 发布