Buggy code:
public class MainActivity extends ActionBarActivity { final int TAKE_PHOTO_CODE = 0 ; final int UPLOAD_PHOTO_CODE = 1 ; final int VIEW_PHOTO_CODE = 2 ; String which_photo = "" ; String dir = ( Environment . getExternalStoragePublicDirectory ( DIRECTORY_PICTURES ) ) + "//remitbee//" ; private ProgressDialog pd = null ; User user_detail = new User ( "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" ) ; TextView name ; TextView email ; TextView phone ; TextView unique_id ; TextView name_lbl ; TextView email_lbl ; TextView phone_lbl ; TextView unique_id_lbl ; ImageView cus_id_1 ; ImageView cus_id_2 ; ImageView cus_id_3 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent intent ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } public void upload_picture ( View v ) { } public void camera_picture ( ) { } public void openGallery ( ) { } public void make_uri_and_update ( String trigger , Bitmap result , File imgFile ) { } class AsyncTaskMakePic extends AsyncTask < String , Void , Bitmap > { String trigger ; Uri selectedImageuri ; Bitmap newResult = null ; ContentResolver cr ; Context context ; File imgFile ; public AsyncTaskMakePic ( Context context , String which_pic , Uri uri , ContentResolver cr ) { } private Exception exception ; @ Override protected void onPreExecute ( ) { } protected Bitmap doInBackground ( String ... urls ) { imgFile = new File ( ( ( dir ) + "remitbee_profile_pic.jpg" ) ) ; Bitmap myBitmap = null ; System . out . println ( ( "PATH:<seq2seq4repair_space>" + ( selectedImageuri ) ) ) ; try { myBitmap = Media . getBitmap ( cr , selectedImageuri ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } FileOutputStream fileOut = null ; try { fileOut = new FileOutputStream ( imgFile ) ; <START_BUG> myBitmap . compress ( PNG , 100 , fileOut ) ; <END_BUG> } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } newResult = Bitmap . createScaledBitmap ( myBitmap , 250 , 250 , false ) ; return newResult ; } protected void onPostExecute ( Bitmap result ) { } } public int uploadFile ( String sourceFileUri , String upLoadServerUri ) { } public class AsyncTaskCheckQRCode extends AsyncTask < RequestPackage , String , String > { Context context ; public AsyncTaskCheckQRCode ( Context context ) { } @ Override protected void onPreExecute ( ) { } @ Override protected String doInBackground ( RequestPackage ... params ) { } @ Override protected void onPostExecute ( String result ) { } } class RetrievePic extends AsyncTask < String , Void , Bitmap > { String trigger ; public RetrievePic ( String which_pic ) { } private Exception exception ; protected Bitmap doInBackground ( String ... urls ) { try { URL newurl = null ; try { newurl = new URL ( urls [ 0 ] ) ; } catch ( MalformedURLException e ) { e . printStackTrace ( ) ; } assert newurl != null ; Bitmap mIcon_val = null ; try { URLConnection connection = newurl . openConnection ( ) ; connection . setUseCaches ( true ) ; mIcon_val = BitmapFactory . decodeStream ( connection . getInputStream ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return mIcon_val ; } catch ( Exception e ) { this . exception = e ; return null ; } } protected void onPostExecute ( Bitmap result ) { } } protected boolean isOnline ( ) { } private Animator mCurrentAnimator ; private int mShortAnimationDuration = 100 ; private void zoomImageFromThumb ( final View thumbView , Drawable imageResId ) { } }

Fix:
myBitmap . compress ( JPEG , 50 , fileOut ) ;