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

Make croppedAreaPixels more accurate and rounded #28

Merged
merged 1 commit into from
Mar 23, 2019

Conversation

ValentinH
Copy link
Owner

@ValentinH ValentinH commented Mar 22, 2019

In order to make croppedAreaPixels more accurate, we now compute the width
or the height (depending on the image ratio) based on the aspect property and
the width/height.

Also, we now round pixels values so they are integers.

Address #27

Demo of @raRaRa with this fix: https://codesandbox.io/s/0qk168vl10

@ValentinH ValentinH force-pushed the make-croppedareapixels-more-accurate branch 5 times, most recently from 72a1f3b to 3b9996d Compare March 22, 2019 15:57
In order to make croppedAreaPixels more accurate, we now compute the width
or the height (depending on the image ratio) based on the aspect property and
the width/height.

Also, we now round pixels values so they are integers.
@ValentinH ValentinH force-pushed the make-croppedareapixels-more-accurate branch from 3b9996d to 5b811bb Compare March 22, 2019 15:58
@ValentinH ValentinH merged commit 744b795 into master Mar 23, 2019
@ValentinH ValentinH deleted the make-croppedareapixels-more-accurate branch March 23, 2019 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant