public void setImageBitmap(Bitmap bitmap, ExifInterface exif) {
    Bitmap setBitmap;
    int degreesRotated = 0;
    if (bitmap != null && exif != null) {
      BitmapUtils.RotateBitmapResult result = BitmapUtils.rotateBitmapByExif(bitmap, exif);
      setBitmap = result.bitmap;
      degreesRotated = result.degrees;
      mInitialDegreesRotated = result.degrees;
    } else {
      setBitmap = bitmap;
    }
    mCropOverlayView.setInitialCropWindowRect(null);
    setBitmap(setBitmap, 0, null, 1, degreesRotated);
  }
Sets a Bitmap and initializes the image rotation according to the EXIT data.<br>
<br>
The EXIF can be retrieved by doing the following: <code>
ExifInterface exif = new ExifInterface(path);</code>

@param bitmap the original bitmap to set; if null, this
@param exif the EXIF information about this bitmap; may be null
core/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java