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

Cropper empty space #444

Open
mridulbarman027 opened this issue Feb 14, 2023 · 4 comments
Open

Cropper empty space #444

mridulbarman027 opened this issue Feb 14, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mridulbarman027
Copy link

image

Describe the bug
While rotating image its showing the empty spaces inside the cropper.

@ValentinH
Copy link
Owner

This is not a bug but the expected behaviour.

What would you expect instead of this?

@mridulbarman027
Copy link
Author

Its shoud auto zoom in photo so that it fills the empty space in photos and prevent any empty spaces while rotating. You can check other editors for reference.

@ValentinH
Copy link
Owner

I see your point. The behaviour you expect could be added as a new option (that could be defaulted to "no empty space" in a future major version).

That being said, we need to implement the logic to automatically set the right zoom level based on the rotation. This is not trivial and requires some math/geometry investigation. Are you willing to have a look into this and create a PR?

@ValentinH ValentinH added enhancement New feature or request help wanted Extra attention is needed labels Feb 15, 2023
@mathedu4all
Copy link

Given position and rotation of image, we can calculate the min scale ensure the boundary of image and canvas have no intersections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants