mr0xf00 / easycrop

Image cropper for jetpack compose
Apache License 2.0
81 stars 17 forks source link

Rotate image by specific angle #1

Open filiandrader opened 1 year ago

filiandrader commented 1 year ago

I downloaded your lib to do some tests and I made a method to rotate the photo at a specific angle, not just adding 90 degrees, but I found a bug in the crop overlay, can you fix it?

https://user-images.githubusercontent.com/90324370/208156106-23069ea6-e6db-4c75-9012-05642ffa1c81.mp4

mr0xf00 commented 1 year ago

Hi @filiandrader The problem here is that the crop region is updated whenever the transform is updated as well, but the way it's done currently is by snapping the transform to the nearest 90deg angle first. It's of course possible to switch it to a more generic behavior since almost everything else is done using matrices. I might not have a working release with that feature added for a while (need to figure out the ui for it as well), but if you can share the code you're using right now to get the custom angle, I'll give you some hints as to what you might need to get everything working.