rycks / cordova-plugin-image-cropper

native image cropper plugin in cordova / ionic app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cordova-plugin-image-cropper

Crop an image in a Ionic/Cordova app

Install Cordova

& cordova plugin add https://github.com/Riyaz0001/cordova-plugin-image-cropper.git

Install Ionic v3 & v4

& ionic cordova plugin add https://github.com/Riyaz0001/cordova-plugin-image-cropper.git

NOTE: Make sure your Cordova CLI version is 5.0.0+ (check with cordova -v). Cordova 4.x and below uses the now deprecated Cordova Plugin Registry as its plugin repository, so using a version of Cordova 4.x or below will result in installing an old version of this plugin.

Usage

 // callback function
ImageCropper.cropImage(imgUrl,
	// success callback
	function (imgPath) {
	    // saved cropted image path
	    console.log(imgPath);

	    // error callback
   }, function (err) { console.error(err); });

Ionic v3 & v4:

// callback function
   (<any>window).ImageCropper.cropImage(imgUrl,
	// success callback
	function (imgPath) {
	    // saved cropted image path
	    console.log(imgPath);

	    // error callback
   }, function (err) { console.error(err); });

Plugin Working Demo:

Libraries used

License

MIT © Riyaz

Try to update - 2023-11-01

About

native image cropper plugin in cordova / ionic app.

License:MIT License


Languages

Language:Java 96.6%Language:JavaScript 3.4%