Android Image Cropper

Powerful (Zoom, Rotation, Multi-Source), customizable (Shape, Limits, Style), optimized (Async, Sampling, Matrix) and simple image cropping library for Android.

TagImage Croppers
LicenseApache License, Version 2.0
Min SDK : 10
Language : Java

Github Info

Android Image Cropper

Android Arsenal Download

Powerful (Zoom, Rotation, Multi-Source), customizable (Shape, Limits, Style), optimized (Async, Sampling, Matrix) and simple image cropping library for Android.



For a working implementation, please have a look at the Sample Project

See GitHub Wiki for more info.

Include the library

 compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'

Using Activity

  1. Add CropImageActivity into your AndroidManifest.xml

    <activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
     android:theme="@style/Base.Theme.AppCompat"/> <!-- optional (needed if default theme has no action bar) -->
  2. Start CropImageActivity using builder pattern from your activity

    // for fragment (DO NOT use `getActivity()`)
     .start(getContext(), this);
  3. Override onActivityResult method in your activity to get crop result
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
     if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
         CropImage.ActivityResult result = CropImage.getActivityResult(data);
         if (resultCode == RESULT_OK) {
             Uri resultUri = result.getUri();
         } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
             Exception error = result.getError();

Using View

  1. Add CropImageView into your activity

    <!-- Image Cropper fill the remaining available height -->
  2. Set image to crop

    // or
  3. Get cropped image
    Bitmap cropped = cropImageView.getCroppedImage();
    // or (must subscribe to async event using cropImageView.setOnCropImageCompleteListener(listener))


  • Built-in CropImageActivity.
  • Set cropping image as Bitmap, Resource or Android URI (Gallery, Camera, Dropbox, etc.).
  • Image rotation during cropping.
  • Auto zoom-in/out to relevant cropping area.
  • Auto rotate bitmap by image Exif data.
  • Set result image min/max limits in pixels.
  • Set initial crop window size/location.
  • Request cropped image resize to specific size.
  • Bitmap memory optimization, OOM handling (should never occur)!
  • API Level 10.
  • More..


  • Cropping window shape: Rectangular or Oval (cube/circle by fixing aspect ratio).
  • Cropping window aspect ratio: Free, 1:1, 4:3, 16:9 or Custom.
  • Guidelines appearance: Off / Always On / Show on Toch.
  • Cropping window Border line, border corner and guidelines thickness and color.
  • Cropping background color.

For more information, see the GitHub Wiki.


Change log


  • Fix image picker for xiaomi and huawei phones (thx @nicolabeghin)
  • Fix crop window get corrupted on CropImageView resize.


  • Change required width/height behavior to support resizing (inside/fit/exact) see wiki for details.
  • Add sampling fallback to lower cropped image resolution on OOM error (if image loaded from URI).
  • Setting aspect ratio will also set it to fixed, to help with confusion, add clear aspect ratio method.
  • Add support for setting min/max crop result size in code on CropImageView.
  • Fix cropping failing bug when skia fails region cropping.
  • Add Fallback to Intent.ACTION_PICK if no intent found for Intent.ACTION_GET_CONTENT (thx geolyth)
  • Multi touch support for cropping window (experimental, thx bbwharris)
    • If you previously used requested width/height the default behavior now is to resize inside the cropped image, to preserve the previous behavior you need to pass the SAMPLING option.
    • OnGetCroppedImageCompleteListener and OnSaveCroppedImageCompleteListener is deprecated, use OnCropImageCompleteListener that combines the two and provides the result object as crop activity.
    • Set aspect ratio also sets fixed aspect ratio to true, if this is not the desired behavior set the fix aspect ratio flag manually or call the method after calling set aspect ratio.


  • Fix to webp file extension (thx Nathan)
  • Fix wrong initial crop window when image contains exif data.
  • Added corners to circular crop window, can be removed by setting BorderCornerThickness to 0.

See full change log.


Originally forked from edmodo/cropper.

Copyright 2016, Arthur Teplitzki, 2013, Edmodo, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Please add comment to for any clarification.


Technology enthusiast. Loves to tinker with things. Always trying to create something wonderful using technology. Loves coding for Android, Raspberry pi, Arduino , Opencv and much more.

You may also like...