Crop an image in a Cordova app
-Made the color in Android programmable -For iOS, added this: kishikawakatsumi/PEPhotoCropEditor#52 And: kishikawakatsumi/PEPhotoCropEditor#51 (comment)
$ cordova plugin add --save 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) {
})
- quality: Number
The resulting JPEG quality. default: 100
- iOS: PEPhotoCropEditor
- Android: android-crop
MIT © Jeduan Cornejo