cstefanache / angular2-img-cropper

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

Cropped image file size is larger than the original image file size #134

Closed nz-jun closed 7 years ago

nz-jun commented 7 years ago

I tried to crop an image with dimensions of 2048x505 pixels and has 125KB file size only. But the cropped image has dimensions of 6000x696 pixels and now has 400KB file size.

This is really a major issue.

These are the settings I used

this.cropperHeroSettings.width = 1400; this.cropperHeroSettings.height = 400; this.cropperHeroSettings.minWidth = 1400; this.cropperHeroSettings.minHeight = 100; this.cropperHeroSettings.canvasWidth = 600; this.cropperHeroSettings.canvasHeight = 280; this.cropperHeroSettings.rounded = false; this.cropperHeroSettings.keepAspect = false; this.cropperHeroSettings.noFileInput = true; this.cropperHeroSettings.preserveSize = true; this.cropperHeroSettings.minWithRelativeToResolution = true; this.cropperHeroSettings.responsive = false;

cstefanache commented 7 years ago

Will have to add a compression as parameter to the settings The problem is that we are adding the image to the canvas (in order to rotate it) and extract the base64 data out of it

nz-jun commented 7 years ago

ETA on this?

cstefanache commented 7 years ago

done - will be released soon

nz-jun commented 7 years ago

Thank you so much. Will wait for the next release. 😉

cstefanache commented 7 years ago

It should be already released with 0.8.0

On Fri, Feb 24, 2017 at 12:14 AM kiddojrme notifications@github.com wrote:

Thank you so much. Will wait for the next release. 😉

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/cstefanache/angular2-img-cropper/issues/134#issuecomment-282138918, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7c4Qxt47hdU5dCXlqaBStFJw9L_rVlks5rfgSzgaJpZM4MICPs .