Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
- Update gradle wrapper to 4.4
- Update support library to 27.1.1 and set is statically! (thx @androideveloper)
- Fix NPE in activity creation by tools (thx @unverbraucht)
- More translations (thx @gwharvey, @dlackty, @JairoGeek, @shaymargolis)
- Update to sdk v27
- Update to gradle v3
- Try solve manifest merger issue by adding
transitiveflag #405 (thx @j-garin)
- Use thread pool executors for async image loading and cropping operations to prevent app hang if default executor is busy (thx @ruifcardoso)
- Fix image rotation breaking min/max crop result restrictions #401
- Propagate all extra data set on start crop activity intent back in crop result intent #352
- Update to sdk v26
- Update gradle plugin to 2.0
- Update min sdk version to 14
- Fix NPE in
crop_image_menu_cropdrawable support, replace with
- Support setting crop button title via builder api.
- Add string resource for "no permissions" toast.
- Fix toolbar menu crop icon sometimes appears with random icon (#305)
- Use CharSequence instead of string for activity title (thx @KentHawkings) (#297)
- Fix class not found exception on some Samsung devices (Huge thanks to @Vantablack) (#332)
- Add original image dimensions to CropResult (Thanks @gazialankus) (#327)
- Making the library JitPack-friendly (Thanks @gazialankus) (#325)
- Allow a Fragment to call the startPickImageActivity help method in CropImage (Thanks @cdavietei) (#315)
- Fix undefined drawable in Android Studio 3.0 (thx @adrien-aubel)
- Fix image exif (rotation) data not always extracted during image loading (thx @danikula).
- Adding option to omit camera intents on getPickImageChooserIntent (thx Hugo Rossi)
- Portuguese Language localization (thx Hugo Rossi)
- Removed saving bitmap into parcel in
- By default nothing will happen and the view will be restored empty (if cropping image loaded using bitmap).
- Added config
SaveBitmapToInstanceStateto enable saving bitmap to temp file so it can be restored (default is false because of possible performance implications).
- Always prefer using URI to load image from cropping!
- Fix restore state not restoring rotation.
- Fix initial crop window may be in invalid position because reading previous image instance state.
- Fix instance state saved before any image loaded resulted in corrupted initial crop rectangle.
- Fix corners of crop overlay offset for oval shape resulting in confusing UI (#256).
- Fix support for negative rotation values for CropImageActivity.
startmethod that accepts
android.app.Fragment, annotated with
- Super simple crop activity quick start flow that handles URI and permissions (huge thanks to @adwiv)
- Add image horizontal/vertical flipping during cropping (huge thanks to @tibbi).
- Handle OOM error for cropping set bitmap object, previously only image set by URI handled OOM.
- Allows for rotation degrees to be negative, fixes operator-precedence-related bug in flipAxes computation (thx Tim Cooke)
- Added crop overlay released listener (thx Richard Yee)
- Added originalUri and originalBitmap to CropResult object.
resetCropRect()resetting image rotation to 0 instead of the original exif data.
- Fix ignoring image rotation data in
setImageBitmap(Bitmap, ExifInterface )method.
- Removed deprecated listeners.
- Fix image picker for xiaomi and huawei phones (thx @nicolabeghin)
- Fix crop window get corrupted on
- 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)
- BREAKING CHANGES:
- 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.
OnSaveCroppedImageCompleteListeneris deprecated, use
OnCropImageCompleteListenerthat 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
- Fix Android state restore overrides state set by client.
- Fix rotation zooms and changes aspect ratio when fixed aspect ratio is used.
- Fix listeners getting garbage collected bug (thx @TheFinestArtist)
- Fix non-straight angle rotation handling.
- Add activity counter-clockwise rotation button (configurable, hidden by default).
- Add activity rotation degrees configuration (default 90)
- Support for requesting CAMERA permission for android M when CAMERA is requested in the manifest.
pick_image_intent_chooser_titlefor changing and localizing pick image chooser title (thx maksymkhar).
- NPE when clicking crop twice fast (thx Jesse).
noOutputImageoption for crop image activity.
- add more customization to crop image activity.
- Minor fixes.
CropImageActivityfor quick start and common scenarios.
- Save cropped image to Uri API
- Handle possible out-of-memory in image load by down-sampling until succeed.
- Minor fixes.
- Fix counter clockwise rotation resulting in negative degrees (#54).
- Auto-zoom: zoom-in when crop window takes less than 50% of the image, zoom-out when more than 65%.
- Handle cropping of non-straight angles rotations for URI loaded images.
- Improve performance for image rotation.
- Improve performance for rotation due to exif orientation data.
- Improve performance for orientation change.
- Preserve crop window on rotations for straight angles - 90/180/270.
- Preserve crop window on orientation change.
- Handle max allowed texture size on device by down-sampling to be within the limit.
- API breaking changes:
getActualCropRectNoRotation(), replaced by 'getCropPoints()' and 'getCropRect()'.
- Moved to custom
- Known issues:
- Boundaries and orientation change for non-straight angle rotation of images.
- Fix off-by-1 error in cropping rectangle, double verify width == height for 1:1 fixed aspect ratio.
- add fallback in crop to use
getActualCropRectto adjust by sampling size for images loaded from URI.
- Fix crop window size bounded with fixed aspect ratio and move of a single edge.
CropImageHelperclass to simplify cropping image work.
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.
- Fix crop window resize bug with fixed aspect ratio
getRotatedDegrees()to get how much the image was rotated during cropping
setCropRect(Rect)to set initial cropping window location and size to specific window on the image.
Due too large changes in the internals please consider this a beta release, if you use it be sure to test is thoroughly and report any bugs you find (report no bugs will also be awesome) or use 1.1.0 until I feel 1.2.* is stable enough.
- Rewrite internal crop window handling.
cropprefix to all customization resources to prevent naming collision (breaking change).
CropImageView.Guidelinesenum of guidelines config instead of integer (breaking change).
- Change custom attributes types to
dimensionwhere appropriate (breaking change).
setShowCropOverlay(boolean)method allowing to hide/show crop overlay UI for animation or element transition.
cropInitialCropWindowPaddingRatiocustomization [0 - 0.5) to control initial crop window padding from image borders relative to image size.
- Add min limit config on cropping window width/height in the UI (
- Add min/max config on cropping image result width/height (
- Add customization support for border line, border corner, guidelines and background.
- Fix progress bar not showing on loading if previously bitmap was directly set.
getCroppedImageAsync()for better handling of slow image loading/decode/cropping.
- Fixed Save/Restore state handling, proper orientation change expirience.
- Bug fixes on rotation and bitmap recycled error.
setSnapRadius(float)allowing to disable snap by setting 0.
- Nicer rectengular crop border.
- Fix oval shape rendering on old devices by disabling hardware rendering when required.