Donaldcwl / browser-image-compression

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

Wrong proportions at the output #6

Closed ArthurMiroslavsky closed 5 years ago

ArthurMiroslavsky commented 5 years ago

Hi, great job! But i have a some issue with proportions. I take a portrait orientation and get the output image, which is rotated and squeezed

Donaldcwl commented 5 years ago

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

Awestin17 commented 5 years ago

Hi, I seem to be having the same or similar issue. From a file select, if a mobile user chooses to take a new picture instead of choosing one from their gallery and the photo they take is in portrait, then the resulting compressed photo has a black bar across the bottom, and the original picture is squished into a smaller area. DistortedPhoto

Donaldcwl commented 5 years ago

@Awestin17 Hi,

Does it work fine when you select image from gallery?

Can you give details on the mobile device/model, browser version you have tested on?

Awestin17 commented 5 years ago

@Donaldcwl It seems to work fine when selecting an existing item from the gallery.

I tested using both a Pixel 2 using Chrome and an iPhone using Safari. Same results on both, all pictures from gallery compressed correctly, horizontal images directly from camera compressed correctly, but vertical images directly from camera came out like the one above.

Thanks.

Donaldcwl commented 5 years ago

@ArthurMiroslavsky @Awestin17 The issue should be addressed in the new version v1.0.2. Please try. Thanks!

Awestin17 commented 5 years ago

@Donaldcwl Will do more testing when I get a chance but everything seems to be working as expected. Great work man!

Donaldcwl commented 5 years ago

@Donaldcwl Will do more testing when I get a chance but everything seems to be working as expected. Great work man!

@Awestin17 Thanks!