public static void saveBitmapToFile(Bitmap bmp,String fullPathWithFileName) throws IOException {
  FileOutputStream out=null;
  try {
    out=new FileOutputStream(createParentDirIfNotExists(fullPathWithFileName));
    bmp.compress(Bitmap.CompressFormat.PNG,100,out);
  }
  finally {
    try {
      if (out != null) {
        out.close();
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

public static void saveBitmapToFile ( Bitmap bmp , String fullPathWithFileName ) throws IOException { FileOutputStream out = null ; try { out = new FileOutputStream ( createParentDirIfNotExists ( fullPathWithFileName ) ) ; bmp . compress ( Bitmap . CompressFormat . PNG , 100 , out ) ; } finally { try { if ( out != null ) { out . close ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } } }
save a bitmap to a local file
