Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 5b3845326 -> 76ad059c9


CB-10541: Changing default maxResoltion to be highestAvailable for 
CameraCaptureUI


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/76ad059c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/76ad059c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/76ad059c

Branch: refs/heads/master
Commit: 76ad059c9c1749a04ba5b61a3d34996e328c6463
Parents: 5b38453
Author: Raghav Katyal <[email protected]>
Authored: Thu Feb 4 12:14:16 2016 -0800
Committer: Raghav Katyal <[email protected]>
Committed: Thu Feb 4 12:14:16 2016 -0800

----------------------------------------------------------------------
 src/windows/CameraProxy.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/76ad059c/src/windows/CameraProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/CameraProxy.js b/src/windows/CameraProxy.js
index 36e53d7..2b320e0 100644
--- a/src/windows/CameraProxy.js
+++ b/src/windows/CameraProxy.js
@@ -710,7 +710,10 @@ function takePictureFromCameraWindows(successCallback, 
errorCallback, args) {
     var UIMaxRes = WMCapture.CameraCaptureUIMaxPhotoResolution;
     var totalPixels = targetWidth * targetHeight;
 
-    if (totalPixels <= 320 * 240) {
+    if (targetWidth == -1 && targetHeight == -1) {
+        maxRes = UIMaxRes.highestAvailable;
+    }
+    else if (totalPixels <= 320 * 240) {
         maxRes = UIMaxRes.verySmallQvga;
     } else if (totalPixels <= 640 * 480) {
         maxRes = UIMaxRes.smallVga;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to