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

Convert 1bit PNGs before resizing #859

Merged
merged 1 commit into from Feb 14, 2017
Merged

Convert 1bit PNGs before resizing #859

merged 1 commit into from Feb 14, 2017

Conversation

kevin1024
Copy link
Contributor

When PIL resizes 1-bit images, it always falls back to the "nearest
neighbor" algorithm, which makes some pretty ugly thumbnails.

This will force thumbor to convert 1-bit images, the same way it
converts 8-bit images, before resizing.

Example of the difference:

resize

See also: #376 which does the same thing for 8-bit PNGs.

When PIL resizes 1-bit images, it always falls back to the "nearest
neighbor" algorithm, which makes some pretty ugly thumbnails.

This will force thumbor to convert 1-bit images, the same way it
converts 8-bit images, before resizing.
@masom
Copy link
Contributor

masom commented Feb 14, 2017

Thanks for this patch!
🐑

@masom masom merged commit 120707a into thumbor:master Feb 14, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants