Here you can find the source of saveBitmap(Bitmap bitmap, String filename)
public static boolean saveBitmap(Bitmap bitmap, String filename)
//package com.java2s; import java.io.FileOutputStream; import java.io.OutputStream; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; public class Main { public static boolean saveBitmap(Bitmap bitmap, String filename) { if (bitmap == null) return false; try {/*from w w w. j a va2s .co m*/ OutputStream out = new FileOutputStream(filename); ; bitmap.compress(CompressFormat.JPEG, 100, out); out.close(); return true; } catch (Exception e) { return false; } } }