Skip to content

KeepAspectRatio, sizes and orientation #98

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

Closed
carrbrpoa opened this issue Mar 22, 2018 · 3 comments
Closed

KeepAspectRatio, sizes and orientation #98

carrbrpoa opened this issue Mar 22, 2018 · 3 comments
Assignees

Comments

@carrbrpoa
Copy link

Hello,

As and enhancement, is it possible that width and height could be treated conditionally when KeepAspectRatio is set to true, depending on camera orientation when photo is taken?

Motive: let's say I have the following options setted:

takePicture({
	width: 640,
	height: 480,
	keepAspectRatio: true,
...

As a result, I see that landscape/horizontal photo I take, is like 576x324 (Ok case).

Also see that portrait/vertical photo is 648x1152 (because of the "rule" that says that only one of width/height could be respected with keepAspectRatio: true), but actually, in this case, would be better for me to specify that when taking portrait photo, I would like to have maybe width: 480 and height: 640.

@elena-p
Copy link
Contributor

elena-p commented Nov 6, 2018

AC:

  • When keepAspectRatio is set to true, treat provided width and height according to screen orientation - in landscape use the bigger of the two values as width and in portrait use the bigger of the two values as height
  • When keepAspectRatio is set to false, provide image with the specified dimensions regardless of the screen orientation (current behaviour)
  • Demo and angular demo should be updated with options to enter keepAspectRatio, width and height; The demos should display width, height and scale of the taken image

@zbranzov
Copy link
Contributor

zbranzov commented Nov 9, 2018

The feature is released in [email protected]. Enjoy!

@carrbrpoa
Copy link
Author

carrbrpoa commented Nov 9, 2018

The feature is released in [email protected]. Enjoy!

Actually since I suggested that, I needed to embed the camera with another plugin, because sometimes my app was being "chosen" to be killed in low resources device, when it was to switch to camera app. I know it's Android's behavior, so it was the solution I found.

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

5 participants