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