ngImgCrop icon indicating copy to clipboard operation
ngImgCrop copied to clipboard

result-image-quality doesn't work

Open abelbarbosa opened this issue 9 years ago • 3 comments

I'm using ngImgCrop with ng-file-upload.

Everything works perfect except that the resulting image is 4 times bigger (disk space) than the original, despite having 1/4 of the dimensions. I've tried to set type to jpg and the result-image-quality to 0.5 but the resulting size is always the same.

<img-crop image="originalImg | ngfDataUrl" result-image-size="500" result-image-format="image/jpg" result-image-quality="0.5"
            area-type="square" result-image="cover" ng-init="cover=''">
</img-crop>

My objective was to get a smaller image in size (disk space) and dimensions.

Shouldn't it be smaller? Why is the resulting image so big?

Thank you.

abelbarbosa avatar Jun 15 '16 14:06 abelbarbosa

I faced the same issue. Tried to set different qualities but no luck... Result image size was always the same.

SergeyMell avatar Jan 06 '17 08:01 SergeyMell

@SergeyMell This project was abandoned 2 years ago so you should use an alternative like ui-cropper that works in a very similar way with more freedom, options and actively maintained. Also you can compress the image in the server side. Currently I'm using imagemin for node. You can see an example here. Hope it helps.

Cheers.

abelbarbosa avatar Jan 06 '17 10:01 abelbarbosa

@abelbarbosa Thanks a lot for your answer

SergeyMell avatar Jan 06 '17 11:01 SergeyMell