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

iOS: maxWidth / maxHeight intrepreted as minimal values #27

Closed
squio opened this issue Mar 26, 2015 · 1 comment
Closed

iOS: maxWidth / maxHeight intrepreted as minimal values #27

squio opened this issue Mar 26, 2015 · 1 comment

Comments

@squio
Copy link
Contributor

squio commented Mar 26, 2015

Not completely sure this is a bug or rather my interpretation.

I take a picture with the following parameters: takePicture({maxWidth:640, maxHeight:640});
Expected result: the saved image will be at most 640 pixels width OR height, the other dimension smaller.
Actual result: the smallest dimension is 640 pixels, the other dimension bigger.
If this is not intended the fix is trivial: change the less than comparison into greater than in line 202 of CameraPreview.m like this:

            CGFloat scale = scaleHeight > scaleWidth ? scaleWidth : scaleHeight;
@mbppower
Copy link
Collaborator

I haven't had much time to spend on this project. Your help is very appreciated. Thanks.

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

No branches or pull requests

2 participants