cordova-plugin-crop-on-steroids
v1.0.0
Published
Crop an image in a Cordova app. You can specify a fixed aspect ratio or no aspect ratio for ANDROID!
Downloads
4
Maintainers
Readme
cordova-plugin-crop-on-steroids
Crop an image in a Cordova app
Install
$ cordova plugin add --save cordova-plugin-crop-on-steroids
Usage
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) {
})
API
- quality: Number The resulting JPEG quality. default: 100
ANDROID ONLY
- in order to target a certain aspect ratio, the options value must be an array of the two dimensions:
[width, height]
Libraries used
- iOS: PEPhotoCropEditor
- Android: android-crop
License
MIT © Jeduan Cornejo