cordova-plugin-crop icon indicating copy to clipboard operation
cordova-plugin-crop copied to clipboard

Full example use this plugin

Open lapisanlangit opened this issue 9 years ago • 5 comments

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

lapisanlangit avatar Feb 06 '16 00:02 lapisanlangit

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)
      );

ddomingues avatar Mar 24 '16 13:03 ddomingues

Congratulations @jeduan for this abstraction :100: :star:

ddomingues avatar Mar 24 '16 13:03 ddomingues

@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 avatar May 10 '16 20:05 RupenAnjaria

@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

piyushdutta avatar Jul 06 '16 10:07 piyushdutta

It is not working in ios. can anyone help me out why it is not working in ios?

ghost avatar Apr 25 '17 10:04 ghost