Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
cordovaCapture captureImage不读取选项_Cordova_Ionic Framework_Cordova Plugins - Fatal编程技术网

cordovaCapture captureImage不读取选项

cordovaCapture captureImage不读取选项,cordova,ionic-framework,cordova-plugins,Cordova,Ionic Framework,Cordova Plugins,我正在将ionic与cordovaCapture模块一起使用 但它不会读取我作为变量传递的选项: var options = { limit: 1, quality: 100, targetWidth: 1280, targetHeight: 1280, correctOrientation: true, saveToPhotoAlbum: false }; $cordovaCapture.captureImage(options).then(fu

我正在将ionic与
cordovaCapture
模块一起使用

但它不会读取我作为变量传递的选项:

var options = {
    limit: 1,
    quality: 100,
    targetWidth: 1280,
    targetHeight: 1280,
    correctOrientation: true,
    saveToPhotoAlbum: false
};
$cordovaCapture.captureImage(options).then(function (imageData) {
    var imgData = imageData[0].fullPath;
    // here I upload them to remote Server

}, function (error) {
    alert('error');
});
拍摄的图像没有纠正他的方向,没有最大1280px的宽度或高度,并且总是保存到相册中。。设置选项的正确方法是什么?

是否使用或

第一种选择非常有限;检查:

第二个更完整;检查:

但要捕获的API是:

var options = {
      quality: 50,
      destinationType: Camera.DestinationType.DATA_URL,
      sourceType: Camera.PictureSourceType.CAMERA,
      allowEdit: true,
      encodingType: Camera.EncodingType.JPEG,
      targetWidth: 100,
      targetHeight: 100,
      popoverOptions: CameraPopoverOptions,
      saveToPhotoAlbum: false,
      correctOrientation:true
    };

    $cordovaCamera.getPicture(options).then(function(imageData) {
      var image = document.getElementById('myImage');
      image.src = "data:image/jpeg;base64," + imageData;
    }, function(err) {
      // error
    });
你在用还是

第一种选择非常有限;检查:

第二个更完整;检查:

但要捕获的API是:

var options = {
      quality: 50,
      destinationType: Camera.DestinationType.DATA_URL,
      sourceType: Camera.PictureSourceType.CAMERA,
      allowEdit: true,
      encodingType: Camera.EncodingType.JPEG,
      targetWidth: 100,
      targetHeight: 100,
      popoverOptions: CameraPopoverOptions,
      saveToPhotoAlbum: false,
      correctOrientation:true
    };

    $cordovaCamera.getPicture(options).then(function(imageData) {
      var image = document.getElementById('myImage');
      image.src = "data:image/jpeg;base64," + imageData;
    }, function(err) {
      // error
    });