cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Image quality get reduced after cropping #275

Open shijithkm opened 6 years ago

shijithkm commented 6 years ago

Before upload dpi of the image was 300 but after cropping this got reduced to 96

Any idea how to fix this ?

Here is my config

  this.cropperSettings = new CropperSettings();
  this.cropperSettings.width = 400;
  this.cropperSettings.height = 400;
  this.cropperSettings.croppedWidth = 400;
  this.cropperSettings.croppedHeight = 400;
  this.cropperSettings.canvasWidth = 400;
  this.cropperSettings.canvasHeight = 400;
  this.cropperSettings.noFileInput = true;
  this.cropperSettings.fileType = 'image/jpeg'
  this.imageData = {};
cstefanache commented 6 years ago

Have you tried etting: preserveSize: true?

equero commented 6 years ago

The problem is solved with @cstefanache post. I can confirmed. I suggest to close this issue

this.cropperSettings.preserveSize = true;