Yalantis / uCrop

Image Cropping Library for Android
https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
11.86k stars 2.16k forks source link

Rotate doesn't work on square images #294

Closed VirtualFox0 closed 6 years ago

VirtualFox0 commented 7 years ago

If the image has the same height and width and you do nothing except rotate the image by 90°, the rotation is not saved. I found the problem in BitmapCropTask.java - there is only a "shouldCrop" check. This checks only if crop is needed (by height/width).

private boolean crop(float resizeScale) throws IOException { ... if (shouldCrop ) { ....

Maybe the a simple check if rotation needed helps private boolean crop(float resizeScale) throws IOException { ... if (shouldCrop || mCurrentAngle != 0 ) { ....

see pull request: https://github.com/Yalantis/uCrop/pull/295

Legementarion commented 6 years ago

@ISCHI Hello! I checked your case in last ucrop version (2.2.2) and everything work fine. I think this issue is fixed. If you dont mind I will close the issue, or if your problem still reproduce, please reopen and give more information.

Thank for your issue :)