public static void saveImage(final Bitmap bitmap,final File saveToFile){
  if (saveToFile.exists()) {
    saveToFile.delete();
  }
  try {
    final FileOutputStream out=new FileOutputStream(saveToFile);
    bitmap.compress(Bitmap.CompressFormat.PNG,90,out);
    out.flush();
    out.close();
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
}

public static void saveImage ( final Bitmap bitmap , final File saveToFile ) { if ( saveToFile . exists ( ) ) { saveToFile . delete ( ) ; } try { final FileOutputStream out = new FileOutputStream ( saveToFile ) ; bitmap . compress ( Bitmap . CompressFormat . PNG , 90 , out ) ; out . flush ( ) ; out . close ( ) ; } catch ( final Exception e ) { e . printStackTrace ( ) ; } }
save the image locally ( only for temporary purpose ) this function needs to be default or need to be overhauled
