cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

targetWidth and targetHeight bigger than original picture

Open fareshan opened this issue 9 years ago • 14 comments
trafficstars

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.

fareshan avatar Oct 08 '16 21:10 fareshan

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)

jcesarmobile avatar Oct 10 '16 09:10 jcesarmobile

I just sent the email.

I can complete the documentation.

fareshan avatar Oct 10 '16 09:10 fareshan

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

cordova-qa avatar Oct 10 '16 16:10 cordova-qa

LGTM.

stevengill avatar Oct 10 '16 17:10 stevengill

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.

shazron avatar Oct 10 '16 17:10 shazron

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?

jcesarmobile avatar Oct 30 '16 11:10 jcesarmobile

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

infil00p avatar Nov 08 '16 00:11 infil00p

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)

infil00p avatar Nov 09 '16 17:11 infil00p

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.

jcesarmobile avatar Nov 09 '16 21:11 jcesarmobile

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

bartzy avatar Dec 05 '17 17:12 bartzy

+1 for this

zougamohamed avatar Mar 10 '18 19:03 zougamohamed

Can someone create a JIRA for this and assign it to me so I remember to test this on both iOS and Android?

infil00p avatar Mar 14 '18 23:03 infil00p

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

oscaringit avatar Apr 11 '18 15:04 oscaringit

Hi, is this still happening? Thanks.

chriswardo avatar Jul 02 '19 11:07 chriswardo