Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize with FitMode.crop decrease image quality #66

Open
thebigkhaled opened this issue Mar 1, 2018 · 1 comment
Open

Resize with FitMode.crop decrease image quality #66

thebigkhaled opened this issue Mar 1, 2018 · 1 comment

Comments

@thebigkhaled
Copy link

thebigkhaled commented Mar 1, 2018

Hello,

We're using toucan in our app to resize product images using FitMode.crop. This fit mode produce really bad quality image even though the cropped image would maintain same aspect ratio as the original image.

Resize code in UIImageExtension:

Toucan(image: self).resize(CGSize(width: 345, height: 519), fitMode: Toucan.Resize.FitMode.crop).image!

I couldn't find any reason why this is happening. Please help.

@jayfray12
Copy link

I too have noticed this. However, I think it has more to do with the resize than the crop. If you take the Portrait.jpg in the test code and size it down to 50x50 then the quality is bad. If you do 500x500 it is fine. So it seems as though the smaller the size the poorer the quality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants