cordovaCapture captureImage不读取选项
我正在将ionic与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
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
});