-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: ValueError: Format 'avif' is not supported #30363
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
base: main
Are you sure you want to change the base?
FIX: ValueError: Format 'avif' is not supported #30363
Conversation
I don't think we can merge this until we require Pillow 11.2.1 (the first version to support avif). |
Well, the formats are not changing that often, so that piecemeal can be good enough. The problem with the version exists, but is bearable. People will get an error message if their pillow is too old. Maybe check if that message is good enough or whether we should provide a better message.
# Get the list of supported formats for opening images
supported_open_formats = Image.OPEN.keys()
# Get the list of supported formats for saving images
supported_save_formats = Image.SAVE.keys()
Edit: Actually, this can be done via PIL.features |
Please add a test matplotlib/lib/matplotlib/tests/test_agg.py Line 233 in 011d12f
Note: Use the feature query like here to selectively skip the test matplotlib/lib/matplotlib/tests/test_agg.py Line 252 in 011d12f
|
Ok so I added the test for transparency too, and the kwargs test is basically a copy of the webp test that checks compression quality and kwargs, tell me if there is anything else that should be tested in there. |
Test for ubuntu ARM failed, is this a problem? it seems that it just disconnected, I doubt I made something that makes it fail |
PR summary
closes #28809
This fixes the error
ValueError: Format 'avif' is not supported (supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff, webp)
mentioned when saving a .avif figure by doingfig.savefig('test.avif')
.I am not sure if I should add new tests for this, however I got the same results I got when merging the main branch so I would like feedback on that
PR checklist