public static void storeImage ( Bitmap image , File pictureFile ) { if ( pictureFile == null ) { QuickUtils . log . d ( "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 ) { QuickUtils . log . d ( "File not found: " + e . getMessage ( ) ) ; } catch ( IOException e ) { QuickUtils . log . d ( "Error accessing file: " + e . getMessage ( ) ) ; } }
Stores an image on the storage