Java tutorial
//package com.java2s; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import android.graphics.Bitmap; public class Main { public static void saveBmpToFile(Bitmap bm, File f) throws FileNotFoundException, IOException { if (f.exists()) { return; } FileOutputStream fos = new FileOutputStream(f); bm.compress(Bitmap.CompressFormat.JPEG, 100, fos); fos.close(); } }