public static void storeImage(Bitmap image,File pictureFile){
  if (pictureFile == null) {
    Log.d(TAG,"Error creating media file, check storage permissions: ");
    return;
  }
  try {
    FileOutputStream fos=new FileOutputStream(pictureFile);
    image.compress(Bitmap.CompressFormat.PNG,90,fos);
    fos.close();
  }
 catch (  FileNotFoundException e) {
    Log.d(TAG,"File not found: " + e.getMessage());
  }
catch (  IOException e) {
    Log.d(TAG,"Error accessing file: " + e.getMessage());
  }
}

public static void storeImage ( Bitmap image , File pictureFile ) { if ( pictureFile == null ) { Log . d ( TAG , "Error creating media file, check storage permissions: " ) ; return ; } try { FileOutputStream fos = new FileOutputStream ( pictureFile ) ; image . compress ( Bitmap . CompressFormat . PNG , 90 , fos ) ; fos . close ( ) ; } catch ( FileNotFoundException e ) { Log . d ( TAG , "File not found: " + e . getMessage ( ) ) ; } catch ( IOException e ) { Log . d ( TAG , "Error accessing file: " + e . getMessage ( ) ) ; } }
stores an image on the storage
