Donaldcwl / browser-image-compression

Image compression in web browser
MIT License
1.3k stars 160 forks source link

Image resolution #5

Closed nathanmichel closed 5 years ago

nathanmichel commented 5 years ago

Hi,

I used this code : imageCompression(inputFile, {maxSizeMB: 1, maxWidthOrHeight: 720, useWebWorker: true})

But the resulted dimension of the picture is 3400x2267 (the original dimension being 5184x3456)

The size is what's expected.

I have tried to remove maxSizeMB and using maxWithOrHeight only but the final image keep the original dimension AND the final file weight is much bigger than the original. The size of the original image is 4mo the final image 11mo.

Thank you.

Donaldcwl commented 5 years ago

Hi, Would you mind to upload the image so that I can reproduce the issue? Thanks.

nathanmichel commented 5 years ago

Hi

This is the original image : https://www.dropbox.com/s/eahbut73r92qqwl/beach-by-the-sea-clouds-946343.jpg?dl=0

Donaldcwl commented 5 years ago

@nathanmichel Thanks for reporting this issue I have fixed it and released a new version v1.0.1