Use native Pillow v11.2.0 AVIF format#167
Conversation
| # Quality of 100 implies lossless (according to libavif documentation) | ||
| "quality": 100, | ||
| # When encoding lossless images, don't use chroma subsampling (4:4:4 retains the most information) | ||
| "subsampling": "4:4:4", |
There was a problem hiding this comment.
This isn't a valid option when encoding a grayscale image, should be 4:0:0 instead (grayscale is Pillow L or LA mode image) - something for a follow up?
There was a problem hiding this comment.
let's do it as a follow up (as long as you have the time :D)
There was a problem hiding this comment.
Tried writing a failing test but it turns out save_as_avif will convert from LA to RGBA internally - which makes this not really relevant... or at least not without same yak shaving to figure out why the conversion is happening.
Let's leave this here for now.
398102e to
98948b5
Compare
Requires raising the minimum version of Pillow.
98948b5 to
85b6681
Compare
|
Marking as draft for now, this needs more work (upstream) The Pillow 11.2.0 release was retracted because the added AVIF encoders/decorders severely increased the size of prebuilt wheels, causing the project to hit its PyPI upload limit which resulted in not all platforms having a prebuilt 11.2.0 wheel available. As a result, 11.2.1 was released which no longer ships with the This poses an issue for this PR as we can no longer assume AVIF support is available. The Pillow maintainers have indicated that they will revisit the issue in 11.3.0, so let's cross our fingers and hope they manage to fix the issue 2. Footnotes |
|
Closing, superseded by #170 |
Fixes #166
Pillow v11.2.0 was released today with AVIF support as a notable new feature.
Requires raising the minimum version of Pillow. Only the latest Pillow release receives active support so requiring the latest version doesn't seem like a big issue to me. Especially now that AVIF support in pillow-heif is deprecated, as noted in #166