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

targetWidth and targetHeight bigger than original picture #238

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fareshan
Copy link

@fareshan fareshan commented Oct 8, 2016

Platforms affected

Android, iOS (i can not test for other platforms)

What does this PR do?

When setting targetWidth and targetHeight to a bigger size than original picture, the result picture should be sized like the original picture

What testing has been done on this change?

I tested on version 2.3.0 on iPhone and android emulators.

Checklist

  • Reported an issue in the JIRA database
  • CB-11987: (android, ios) Fix bug with targetWidth and targetHeight bigger than original picture
  • Added automated test coverage as appropriate for this change.

@jcesarmobile
Copy link
Member

I think this should discussed before merging. Can you send an email to [email protected]?

Also, if we decide to merge it, you should document the behaviour for targetWidth and targetHeight being bigger than the original image (in jsdoc2md/TEMPLATE.md)

@fareshan
Copy link
Author

I just sent the email.

I can complete the documentation.

@cordova-qa
Copy link

Cordova CI Build has one or more failures.

Commit - Link
Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Link Link Link

@stevengill
Copy link
Contributor

LGTM.

@shazron
Copy link
Member

shazron commented Oct 10, 2016

This makes sense, but is a backwards incompatible change since the behaviour changes, and some may be using that behaviour.

Either:

  1. Increment the major version number, document the breaking change. Users using the old behaviour won't be surprised with this change because we follow semver.
    OR
  2. Keep the current behaviour, but add a new option "upscale" (suggested) that defaults to true. This would be a minor version change since it's a new feature.

@jcesarmobile
Copy link
Member

BTW, there is a very old issue asking about this
https://issues.apache.org/jira/browse/CB-1859

I think best choice is adding the new "upscale" option as some people might want the old behaviour.
@fareshan can you address this changes and also put CB-1859 on the title so it's linked with the issue?

@infil00p
Copy link
Member

infil00p commented Nov 8, 2016

Cool, this thing doesn't conflict, so this will be interesting.

@infil00p
Copy link
Member

infil00p commented Nov 9, 2016

Yeah, I'm cool with this being in here, but I need to run more tests to see when this is the case. (The original height/width is usually HUGE)

@jcesarmobile
Copy link
Member

I think it makes more sense for photo gallery images, as you might have downloaded them with a low resolution, or maybe when using the front camera in some devices with less than a 1MP.

@bartzy
Copy link

bartzy commented Dec 5, 2017

Is this PR going to merged soon? The current behavior of targetWidth and targetHeight is quite limiting.

@zougamohamed
Copy link

+1 for this

@infil00p

This comment has been minimized.

@oscaringit
Copy link

+1 for this.
Do you plan to merge soon? It is a must. Thanks

DavidWiesner pushed a commit to DavidWiesner/cordova-plugin-camera that referenced this pull request Jul 10, 2018
Tilexou added a commit to Tilexou/cordova-plugin-camera that referenced this pull request Nov 6, 2018
Includes the pull request apache#331 (apacheGH-329) from the main fork
Includes the pull request apache#238 from the main fork
Tilexou added a commit to Tilexou/cordova-plugin-camera that referenced this pull request Nov 6, 2018
Includes the pull request apache#238 from the main fork
@chriswardo
Copy link

Hi, is this still happening? Thanks.

Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in previous comments this can not just be merged as it would be a breaking change, and also one that not all users probably want to have. So it would make sense to use the code as the base for a new option that can be set to enable this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.