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
274 stars 53 forks source link

Add WebP support #70

Closed frmdstryr closed 5 years ago

kaedroho commented 5 years ago

Thanks for this! Implementation looks good on first glance. Just a few comments:

frmdstryr commented 5 years ago

Thanks, I removed the version change, added tests, and added an is_format_supported method to check for WEBP support.

Looks like imghdr doesn't work for webp on 2.7 and 3.4.

frmdstryr commented 5 years ago

I added code to backport imghdr webp detection for python < 3.5, not sure if it should be moved to a compat module or something but it works for all versions now.

kaedroho commented 5 years ago

This looks good, thanks!