question: public static void writeBitmapToFile ( Bitmap bm , File file , int quality ) throws IOException { FileOutputStream fos = new FileOutputStream ( file ) ; bm . compress ( Bitmap . CompressFormat . JPEG , quality , fos ) ; fos . flush ( ) ; fos . close ( ) ; }
target:  Write the given bitmap into the given file. JPEG is used as the compression format with quality set to 100.