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

Take advantage of Pillow's "reducing_gap" argument #50

Open
johanneskoch opened this issue Feb 22, 2021 · 1 comment
Open

Take advantage of Pillow's "reducing_gap" argument #50

johanneskoch opened this issue Feb 22, 2021 · 1 comment

Comments

@johanneskoch
Copy link

Hiya! Thanks for providing django-imagekit and pilkit. We've noticed that thumbnailing huge images (~320 megapixels) is extremely heavy and we've experienced timeouts due to this.

Pillow 7.0.0 introduced a new "reducing_gap" argument that makes resizing these large images a lot more efficient: https://pillow.readthedocs.io/en/stable/releasenotes/7.0.0.html#new-argument-reducing-gap-for-image-resize-and-image-thumbnail-methods

I'll probably be forking and applying this change myself, so I can make a pull-request at that point. What's this project's philosophy on supporting older Pillow/PIL versions? I obviously have no need of backwards-compatibility for my own purposes.

@vstoykov
Copy link
Collaborator

Hi! Thank you for your interest in django-imagekit and pilkit. Normally we are kind of conservative about backward compatibility. Probably I need to see what it the version bundled in the major distributions which are still supported and aim for that. I suppose that Pillow there will be lower than 7.

If the usage of reducing_gap can be made optional (use it if available) then this will be perfect.

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