Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] - One Degree Rotation #95

Open
Canato opened this issue Mar 20, 2021 · 9 comments
Open

[Feat] - One Degree Rotation #95

Canato opened this issue Mar 20, 2021 · 9 comments

Comments

@Canato
Copy link
Member

Canato commented Mar 20, 2021

The library today already rotate images using 90, 180, 270 and 360 angles

The goal is to be able to rotate it by 1 degree difference.

For that will be need to auto zoom crop the image:

  • Let's say the CropOverlay is the same size as the image.
  • When we rotate 5 degrees it will be getting "outside" image area
  • So is need to push the CropOverlay inside and create new limits

Add ui rotation selector, like a carrousel from 0-360

@arpanbag001
Copy link

Any update on this?
Really need this feature.

@Canato
Copy link
Member Author

Canato commented Nov 18, 2021

Hey @arpanbag001 any update will be posted here ^^, sadly I'm not having the most time to dedicate into a new feature, but is open if someone else wanna add =D

@BlueCobold
Copy link

Still no news on this, I guess?

@Canato
Copy link
Member Author

Canato commented Sep 5, 2022

No, if there is someone working on it, a PR a mention or anything this will be updated

@Sandroisu
Copy link

Sandroisu commented Sep 8, 2022

When I rotating CropImageView with 5 degree my app crashing)
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed at android.graphics.Canvas.checkValidClipOp(Canvas.java:853) at android.graphics.Canvas.clipRect(Canvas.java:876) at com.canhub.cropper.CropOverlayView.drawBackground(CropOverlayView.kt:676) at com.canhub.cropper.CropOverlayView.onDraw(CropOverlayView.kt:618) at android.view.View.draw(View.java:22350) at android.view.View.updateDisplayListIfDirty(View.java:21226) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473) at android.view.View.updateDisplayListIfDirty(View.java:21186) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:559) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:565) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:642) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4101) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3828) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3099) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972) at android.view.Choreographer.doCallbacks(Choreographer.java:796) at android.view.Choreographer.doFrame(Choreographer.java:731) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

@Sandroisu
Copy link

I can create a pull request to fix this

@Canato
Copy link
Member Author

Canato commented Sep 8, 2022

Please @Sandroisu open the PR, will be beneficial for everyone

@MaCls98
Copy link

MaCls98 commented Sep 12, 2022

@Sandroisu ¡Hi! Just want to know if you could create the pull request, I will really apreciate it
Or maybe if you can share your solution, thanks!

@vanniktech
Copy link
Contributor

Mantis, the iOS library I'm using for cropping has a nice rotation dial (bottom section):
https://github.com/guoyingtao/Mantis/blob/master/Images/Mantis%20on%20all%20devices.png?raw=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants