Cordova Cordova Crop Image Plugin Crop Image after clicking using camera or selecting image.


It crops the images in square shape.

This cordova project uses two plugins:

  1. Cordova Camera Plugin --

  2. Cordova Crop Image Plugin --

The Camera plugin is combined with the Crop Image Plugin by putting the Cop Image Plugin Code within the success callback of Camera Plugin Code.

  /*Camera Plugin Code*/, onFail, {
      quality: 50,
      destinationType: Camera.DestinationType.FILE_URI

  function onSuccess(imageData) {
       /*Crop Image Plugin Code*/
       plugins.crop(function success (data) {
          var image = document.getElementById('myImage');
          image.src = data;
       function fail () {

       }, imageData, {quality:100});

 function onFail(message) {
    alert('Failed because: ' + message);