allowEdit in camera plugin returns 原图
allowEdit in camera plugin returns original image
我正在尝试允许用户使用 cordova-plugin-camera 编辑图像。
这是我的代码:
var options = {
quality: 100,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType[type], // CAMERA or PHOTOLIBRARY
allowEdit: true,
targetWidth: 250,
targetHeight: 350
};
navigator.camera.getPicture(function (imageURI) {
$scope.imagesrc = imageURI;
$scope.$apply();
}, function (err) {
alert(err);
}, options);
未在 android 设备 (lenovo A850) 上编辑的图像 returns。
我尝试更新版本并重新安装。
allowEdit 在 Android 上不可预测,不应使用!此插件的 Android 实现尝试在用户设备上查找并使用应用程序来进行图像裁剪。该插件无法控制用户选择哪个应用程序来执行图像裁剪,用户很可能会选择不兼容的选项并导致插件失败。这有时可行,因为大多数设备都附带一个应用程序,该应用程序以与此插件兼容的方式处理裁剪(Google Plus Photos),但依赖这种情况是不明智的。如果图像编辑对您的应用程序必不可少,请考虑寻求第三方库或插件,它们提供自己的图像编辑实用程序以获得更强大的解决方案。
我正在尝试允许用户使用 cordova-plugin-camera 编辑图像。
这是我的代码:
var options = {
quality: 100,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType[type], // CAMERA or PHOTOLIBRARY
allowEdit: true,
targetWidth: 250,
targetHeight: 350
};
navigator.camera.getPicture(function (imageURI) {
$scope.imagesrc = imageURI;
$scope.$apply();
}, function (err) {
alert(err);
}, options);
未在 android 设备 (lenovo A850) 上编辑的图像 returns。
我尝试更新版本并重新安装。
allowEdit 在 Android 上不可预测,不应使用!此插件的 Android 实现尝试在用户设备上查找并使用应用程序来进行图像裁剪。该插件无法控制用户选择哪个应用程序来执行图像裁剪,用户很可能会选择不兼容的选项并导致插件失败。这有时可行,因为大多数设备都附带一个应用程序,该应用程序以与此插件兼容的方式处理裁剪(Google Plus Photos),但依赖这种情况是不明智的。如果图像编辑对您的应用程序必不可少,请考虑寻求第三方库或插件,它们提供自己的图像编辑实用程序以获得更强大的解决方案。