Android examples for Graphics:Bitmap Save
save Bitmap as Jpeg file
//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 ww .j ava2s. c o m OutputStream out = new FileOutputStream(filename); bitmap.compress(CompressFormat.JPEG, 100, out); out.close(); return true; } catch (Exception e) { return false; } } }