cordova-plugin-camera
cordova-plugin-camera copied to clipboard
targetWidth and targetHeight bigger than original picture
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
- [x] Reported an issue in the JIRA database
- [x] CB-11987: (android, ios) Fix bug with targetWidth and targetHeight bigger than original picture
- [ ] Added automated test coverage as appropriate for this change.
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)
I just sent the email.
I can complete the documentation.
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 |
LGTM.
This makes sense, but is a backwards incompatible change since the behaviour changes, and some may be using that behaviour.
Either:
- 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
- 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.
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?
Cool, this thing doesn't conflict, so this will be interesting.
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)
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.
Is this PR going to merged soon? The current behavior of targetWidth and targetHeight is quite limiting.
+1 for this
Can someone create a JIRA for this and assign it to me so I remember to test this on both iOS and Android?
+1 for this. Do you plan to merge soon? It is a must. Thanks
Hi, is this still happening? Thanks.