cordova-plugin-crop
cordova-plugin-crop copied to clipboard
Full example use this plugin
i am sorry, i have tried this plugin many times..but always failed.. after install this plugin and place usage code on button click.. but nothing happen...
can you explain to me full example how to use it? i am sorry i am beginner in cordova
Hi @lapisanlangit! Yesterday I integrated this plugin on my ionic app, which works very well. Try to follow the get start, then try to run ionic plugin add cordova-plugin-crop
and use the promise syntax plugins.crop.promise
. I'm using together the cordova-plugin-camera
. See the example using Typescript:
Camera.getPicture({
quality: 100,
sourceType: sourceType
})
.then(
imageURI => {
plugins.crop.promise(imageURI, {quality: 100})
.then(
newPath => {
console.log(newPath);
},
err => console.error(err)
);
},
err => console.error(err)
);
Congratulations @jeduan for this abstraction :100: :star:
@ddomingues May I please know what exactly you are trying to do? are you taking picture from camera and them cropping it? What if I want user to crop it?
@RupenAnjaria just change the imageURI to a given path. i.e if he wants to pick from gallery let him pick it from the photo album or some defined path
It is not working in ios. can anyone help me out why it is not working in ios?