mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
WP8 When only targetWidth or targetHeight is provided, use it as the only bound
This commit is contained in:
parent
fe6dc72a75
commit
4c2c567fd8
@ -197,6 +197,16 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
cameraOptions.AllowEdit = bool.Parse(args[7]);
|
cameraOptions.AllowEdit = bool.Parse(args[7]);
|
||||||
cameraOptions.CorrectOrientation = bool.Parse(args[8]);
|
cameraOptions.CorrectOrientation = bool.Parse(args[8]);
|
||||||
cameraOptions.SaveToPhotoAlbum = bool.Parse(args[9]);
|
cameraOptions.SaveToPhotoAlbum = bool.Parse(args[9]);
|
||||||
|
|
||||||
|
// a very large number will force the other value to be the bound
|
||||||
|
if (cameraOptions.TargetWidth > -1 && cameraOptions.TargetHeight == -1)
|
||||||
|
{
|
||||||
|
cameraOptions.TargetHeight = 100000;
|
||||||
|
}
|
||||||
|
else if (cameraOptions.TargetHeight > -1 && cameraOptions.TargetWidth == -1)
|
||||||
|
{
|
||||||
|
cameraOptions.TargetWidth = 100000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user