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

for a portrait image on rotation moves crop Rect outside image #152

Closed
SamirNvi opened this issue Jul 9, 2020 · 4 comments · Fixed by #157
Closed

for a portrait image on rotation moves crop Rect outside image #152

SamirNvi opened this issue Jul 9, 2020 · 4 comments · Fixed by #157
Labels
bug Something isn't working

Comments

@SamirNvi
Copy link

SamirNvi commented Jul 9, 2020

Hi Valentin/ support ,

Thanks for this wonderful free library. It works nice for me.
I am facing a issue for portrait images. I Have portrait images with aspect ratio set to say 0.66. when i rotate the image to 90 degree my crop rect doesnt change and it stays outside image . i am setting the initial crop area as center cropped area of image.

pls help me to resolve this issue.

image

after rotate
image

@ValentinH
Copy link
Owner

Thanks for the kind words.

It looks like a bug indeed, could you please create a code sandbox showing the issue?

@ValentinH
Copy link
Owner

After checking this bug, it's related to #151. Basically, vertical aspects/images are not properly handled and the internal getCropSize() needs to be improved.

ValentinH added a commit that referenced this issue Jul 18, 2020
Fix #151 #152

We are now using the container size to compute the crop size. Thanks to this, we can better use to available size for the crop area.
@ValentinH ValentinH linked a pull request Jul 18, 2020 that will close this issue
@ValentinH
Copy link
Owner

This should be fixed by #157, could you please test it (using the sandbox linked in the PR) and confirm?

@ValentinH ValentinH added the bug Something isn't working label Jul 18, 2020
ValentinH added a commit that referenced this issue Jul 21, 2020
Fix #151 #152

We are now using the container size to compute the crop size. Thanks to this, we can better use to available size for the crop area.
@ValentinH
Copy link
Owner

Fix release with v3.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants