Java tutorial
//package com.java2s; import android.graphics.Bitmap; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.OutputStream; public class Main { public static boolean saveBitmap2file(Bitmap bmp, String filename) { Bitmap.CompressFormat format = Bitmap.CompressFormat.JPEG; int quality = 100; OutputStream stream = null; try { stream = new FileOutputStream(filename); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } return bmp.compress(format, quality, stream); } }