We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As discussed in #66, it would be great to detect when a transparent channel is fully opaque and remove it before saving the new image.
This speeds up encoding while decreasing file size by around 10%.
Implementing this feature would essentially be:
from PIL import Image image = Image.open(original_filename) if image.mode == 'RGBA': colors = image.getchannel('A').getcolors() if len(colors) == 1 and colors[0][1] == 255: image = image.convert('RGB') image.save(destination)
The text was updated successfully, but these errors were encountered:
@BertrandBordage I think you meant this for wagtail/wagtail rather than wagtail/Willow ;)
Sorry, something went wrong.
@zerolab No I didn’t, see #66 ;)
I take it back, misread "open one on Willow about removing empty alpha channels". Sorry for the noise!
No branches or pull requests
As discussed in #66, it would be great to detect when a transparent channel is fully opaque and remove it before saving the new image.
This speeds up encoding while decreasing file size by around 10%.
Implementing this feature would essentially be:
The text was updated successfully, but these errors were encountered: