Image cropping tool, displays a resizable, rectengular/oval crop window on top of image.
Optimized for cropping image picked from Camera or Gallery
- Support setting cropping image by Android URI loaded by ContentResolver.
- Auto image roatete by reading Exif data to handle rotation by camera.
- Using sampling to reduce memory usage and prevent out-of-memory.
- Support required size and sampling on getting cropped image for memory optimization.
- Set cropping image as Bitmap, Resource or Android URI.
- Set cropping window shape to Rectengular or Oval (circle by setting fixed aspect ration).
- Set image Scale type in the cropping image view: center or fit.
- Control the appearance of guidelines in the crop window.
- Control cropping window aspect ratio, ability to fix it (squared).
- Customization for border line, border corner, guidelines and background.
- Set result image min/max limits in pixels.
- Auto rotate bitmap by provided Exif data or loading from Android URI.
- Rotate image API to allow the user to rotate the image during cropping.
- Get cropping rectangle or the cropped bitmap.
- Supported on API Level 10 and above.
For more information, see the linked Github Wiki page.
compile 'com.theartofdev.edmodo:android-image-cropper:1.2.+'
- Android cropping image from camera or gallery
- Android Image Cropper async support and custom progress UI
1.2.3
- Fix
getActualCropRect
to adjust by sampling size for images loaded from URI. - Fix crop window size bounded with fixed aspect ratio and move of a single edge.
- Added
CropImageHelper
class to simplify cropping image work.
1.2.2 (beta)
- Fix
setShowCropOverlay(boolean)
not working properly. - Fix crop window bounds issue when cropping image is too small relative to min/max bounds with fixed aspect ratio.
- Fix crop window reset on on-screen keyboard show/hide.
See full change log.
Forked from edmodo/cropper fixing some bugs and adding some features.
Copyright 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:
http://www.apache.org/licenses/LICENSE-2.0
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.