You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, it's work fine when you wants to rotate bitmap with setBitmap(rotateBitmap(mOrigBitmap)), but when you scale image then do rotate, it's reassign bitmap to CropperView, so i like to use replaceBitmap(rotatedBitmap) for avoiding reassign bitmap, then i figured out it wan't rotate from center point as it has to.
How to get rid of this strange rotate behavior ?
Flow for this.
cropper.setImageBitmap(mOrigBitmap);
scaling CropperView Image
Bitmap rotatedBitmap= rotateBitmap(mOrigBitmap); -> Applying rotate using rotateBitmap?
cropper.replaceBitmap(rotatedBitmap); -> it's assign bitmap like it's rotate from top-left corner !
Desire result is rotatedBitmap should be replace with reference to center points of scaled bitmap with latest matrix.
The text was updated successfully, but these errors were encountered:
replaceBitmap is not possible for rotating non-square bitmaps.
Rotate is not a feature that this cropper provides
Cropper doesn't have any idea about skew or rotation of the image matrix. And cropper sometimes resets the matrix so manually setting it also won't be helpful.
replaceBitmap is especially used if you just want to replace the bitmap after some processing. eg. brightness-contrast, etc. And is not intended to be used for rotation.
So when you use repalceBitmap, cropper assumes that nothing has changed about the bitmap (size, rotation, etc).
With that said, if you have any suggestions how to go about it (Make cropper aware of rotation of bitmap?), please let me know. PRs are much appreciated.
@jayrambhia
Hello,
Yes, it's work fine when you wants to rotate bitmap with setBitmap(rotateBitmap(mOrigBitmap)), but when you scale image then do rotate, it's reassign bitmap to CropperView, so i like to use replaceBitmap(rotatedBitmap) for avoiding reassign bitmap, then i figured out it wan't rotate from center point as it has to.
How to get rid of this strange rotate behavior ?
Flow for this.
Desire result is rotatedBitmap should be replace with reference to center points of scaled bitmap with latest matrix.
The text was updated successfully, but these errors were encountered: