ailon / cropro

Crop, rotate, flip, and straighten images in your web apps.
Other
13 stars 4 forks source link

Rotate Reduces Resolution #6

Closed ghwilley closed 3 years ago

ghwilley commented 3 years ago

There's no way to rotate an image and retain its resolution. So if you have an image that's 1000 x 500 and go from landscape to portrait, the height of the image will be 500. If you then eliminate the white space on the sides, it's now 250 x 500.

ailon commented 3 years ago

Use renderAtNaturalSize if you want to preserve the original resolution. More info here.

ghwilley commented 3 years ago

Thanks for the fast response!

I am finding that even with renderAtNaturalSize set to true, if I rotate an image, I can not keep the original dimensions. Max height will always be the images original height, and max width will be the images original width.

Steps to reproduce:

The image is now smaller than when it was uploaded.

ailon commented 3 years ago

Yes, you are right. I will look into it. Thanks for reporting this!

ailon commented 3 years ago

Fixed this for renderAtNaturalSize scenario. When it is set to false, I think rendering to what you see on the screen is the correct behavior.

ghwilley commented 3 years ago

Thanks a lot!