下面一段简单的代码给大家介绍了Android把Bitmap保存为PNG图像文件的方法,具体代码如下所示:
public static void saveBitmapAsPng(Bitmap bmp,File f) {
try {
FileOutputStream out = new FileOutputStream(f);
bmp.compress(Bitmap.CompressFormat.PNG, 100, out);
out.flush();
out.close();
} catch (FileNotFoundExcept