jeduan / cordova-plugin-crop

Crop an image in Cordova
MIT License
114 stars 170 forks source link

Quality issue #43

Closed dimitri320 closed 7 years ago

dimitri320 commented 7 years ago

First of all, thanks so much for the awesome plugin! I have a problem, as when I reduce the quality of the photos, the quality/size doesn't reduce. Here's my code. Any advice will be highly appreciated! Many thanks!

      this.camera.getPicture(options).then((imageURI) => {
        this.crop.crop(imageURI, {quality: 20}).then((newImage) => {
        }).catch((error: any) => { console.log('Crop error: ', error); this.loading.dismiss(); });
      }).catch((error: any) => { console.log('Photos error: ', error); this.loading.dismiss(); });
dimitri320 commented 7 years ago

Quality should be from 0 to 1, so 20% will be 0.2, not 20!