private Bitmap crop(BitmapFactory.Options outOptions) throws IOException {
  InputStream inputStream=openBitmapInputStream();
  try {
    Bitmap fullResolutionBitmap=BitmapFactory.decodeStream(inputStream,null,outOptions);
    if (fullResolutionBitmap == null) {
      throw new IOException("Cannot decode bitmap: " + mUri);
    }
    return Bitmap.createBitmap(fullResolutionBitmap,mX,mY,mWidth,mHeight);
  }
  finally {
    if (inputStream != null) {
      inputStream.close();
    }
  }
}

private Bitmap crop ( BitmapFactory . Options outOptions ) throws IOException { InputStream inputStream = openBitmapInputStream ( ) ; try { Bitmap fullResolutionBitmap = BitmapFactory . decodeStream ( inputStream , null , outOptions ) ; if ( fullResolutionBitmap == null ) { throw new IOException ( "Cannot decode bitmap: " + mUri ) ; } return Bitmap . createBitmap ( fullResolutionBitmap , mX , mY , mWidth , mHeight ) ; } finally { if ( inputStream != null ) { inputStream . close ( ) ; } } }
reads and crops the bitmap .
