Closed dielian-wizard-ly closed 7 years ago
As the code in BitmapCropTask.java shows: boolean shouldCrop = shouldCrop(mCroppedImageWidth, mCroppedImageHeight); Log.i(TAG, "Should crop: " + shouldCrop);
if (shouldCrop) {
boolean cropped = cropCImg(mImageInputPath, mImageOutputPath,
cropOffsetX, cropOffsetY, mCroppedImageWidth, mCroppedImageHeight,
mCurrentAngle, resizeScale, mCompressFormat.ordinal(), mCompressQuality,
mExifInfo.getExifDegrees(), mExifInfo.getExifTranslation());
if (cropped && mCompressFormat.equals(Bitmap.CompressFormat.JPEG)) {
ImageHeaderParser.copyExif(originalExif, mCroppedImageWidth, mCroppedImageHeight, mImageOutputPath);
}
return cropped;
} else {
FileUtils.copyFile(mImageInputPath, mImageOutputPath);
return false;
}
if you rotate the image and the overlay simultaneously,the fun cropCImg() will return false...According to the design of UCrop, overlay and its Rect is stable while image can be rotated. My way to solve the problem is to judge if (shouldCrop||mCurrentAngle!=0) --just crop if image has been roated
Hello, @dielian-wizard-ly, @hero0812. Fix for this issue was merged into master.
When the image is rotated by 90 degrees, the crop image still does not rotate before the picture. Hoping to change the picture after the crop rotation