Crop

Improve this doc

$ ionic plugin add cordova-plugin-crop

Repo: https://github.com/jeduan/cordova-plugin-crop

Crops images

Usage

import {Crop} from 'ionic-native';

...

Crop.crop('path/to/image.jpg', {quality: 75})
  .then(
    newImage => console.log("new image path is: " + newImage),
    error => console.error("Error cropping image", error)
  );

Static Members

crop(pathToImage, options)

Crops an image

Param Type Details
pathToImage
options

Returns: Promise<string> Returns a promise that resolves with the new image path, or rejects if failed to crop.

API

Native

General