Crop an image in a Cordova app
$ cordova plugin add --save https://github.com/Nexxa/cordova-plugin-crop
plugins.crop(
function success () {},
function fail () {},
'/path/to/image',
options
)
or, if you are running on an environment that supports Promises (Crosswalk, Android >= KitKat, iOS >= 8)
plugins.crop
.promise('/path/to/image', options)
.then(function success (newPath) {})
.catch(function fail (err) {})
- {Number} [quality=100] - The resulting JPEG quality.
- {Number} [toSize=1080] - Resize image to specified size
- iOS: PEPhotoCropEditor
- Android: android-crop
MIT