wagtail / Willow

A wrapper that combines the functionality of multiple Python image libraries into one API
https://willow.wagtail.org/
BSD 3-Clause "New" or "Revised" License
273 stars 53 forks source link

Retain alpha channel when resizing P images that have transparency #38

Closed kaedroho closed 8 years ago

kaedroho commented 8 years ago

Supersedes #19

This pull request changes the behaviour of the resize operation in the pillow plugin to convert P-formatted images that have transparency to RGBA instead of RGB.

We need to convert it to RGB so we can use a better quality resize algorithm, but some P images require an alpha channel.

This fixes https://github.com/torchbox/wagtail/issues/2464