Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Latest commit

 

History

History
49 lines (33 loc) · 958 Bytes

README.md

File metadata and controls

49 lines (33 loc) · 958 Bytes

cordova-plugin-crop

Crop an image in a Cordova app

Install

$ cordova plugin add --save https://github.com/Nexxa/cordova-plugin-crop

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) {})

Options

  • {Number} [quality=100] - The resulting JPEG quality.
  • {Number} [toSize=1080] - Resize image to specified size

Libraries used

Authors

License

MIT