Skip to content

fix: make dimensions match orientation when keepAspectRatio is true #135

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

Conversation

elena-p
Copy link
Contributor

@elena-p elena-p commented Nov 6, 2018

PR Checklist

What is the current behavior?

When there are provided keepAspectRatio true, width and height, and an image is taken at the opposite mode, the returned image is bigger than expected.
Example: provided width (640) is greater than height (480) and a portrait image is taken, the returned image is 648x1152
#98

What is the new behavior?

When width and height don't match the picture orientation, and keepAspectRatio is true, width and height values will be swapped
In the example above: The returned image will be 480x640

Demos are updated to accept width, height and keepAspectRatio options.

@ghost ghost assigned elena-p Nov 6, 2018
@elena-p elena-p force-pushed the hristova/make-dimensions-match-orientation-when-keepAspectRatio-true branch from 0aed22a to 2dbbcaf Compare November 6, 2018 12:52
@elena-p elena-p requested a review from a team November 6, 2018 14:11
@DimitarTodorov DimitarTodorov merged commit 3f711c9 into master Nov 8, 2018
@ghost ghost removed the new PR label Nov 8, 2018
@elena-p elena-p deleted the hristova/make-dimensions-match-orientation-when-keepAspectRatio-true branch November 15, 2018 07:27
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.

3 participants