You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/01/11 18:09:48 UTC

[GitHub] [cordova-plugin-camera] iPMisterX commented on issue #662: allowEdit : Couldn't save changes due to an error

iPMisterX commented on issue #662:
URL: https://github.com/apache/cordova-plugin-camera/issues/662#issuecomment-758127566


   Now i'm use  [cordova-plugin-crop](https://github.com/jeduan/cordova-plugin-crop) for Crop an image after take picture
   
   ```
   var options = {
       quality : 80,
       destinationType : Camera.DestinationType.FILE_URI,
       sourceType : Camera.PictureSourceType.CAMERA,
       encodingType: Camera.EncodingType.JPEG,
       // allowEdit : true,
       targetWidth: 500
       targetHeight: 500,
       popoverOptions: CameraPopoverOptions,
       saveToPhotoAlbum: false,
       correctOrientation: true
   };
   
   $cordovaCamera.getPicture(options).then(function(imageData) {
       plugins.crop.promise(imageData)
       .then(function success (imageCrop) {
         // Success.
         console.log('Cropped Image Path!: ' + imageCrop);
       })
       .catch(function fail (err) {
         // fail
       });
   }, function(err) {
       // An error occured. Show a message to the user
   });
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org