-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
What did you do?
Open an image and attempt to export it in the AVIF format.
What did you expect to happen?
The export (save) to succeed.
What actually happened?
The following exception gets thrown:
ValueError: unknown file extension: .avif
What are your OS, Python and Pillow versions?
- OS: Arch Linux (rolling)
- Python: 3.13.3
- Pillow: 11.2.1
--------------------------------------------------------------------
Pillow 11.2.1
Python 3.13.3 (main, Apr 9 2025, 07:44:25) [GCC 14.2.1 20250207]
--------------------------------------------------------------------
Python executable is /usr/bin/python3
System Python files loaded from /usr
--------------------------------------------------------------------
Python Pillow modules loaded from /usr/lib/python3.13/site-packages/PIL
Binary Pillow modules loaded from /usr/lib/python3.13/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 11.2.1
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.13.3
--- LITTLECMS2 support ok, loaded 2.17
--- WEBP support ok, loaded 1.5.0
*** AVIF support not installed
--- JPEG support ok, compiled for libjpeg-turbo 3.1.0
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.3
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1
--- LIBTIFF support ok, loaded 4.7.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.2
--- LIBIMAGEQUANT (Quantization method) support ok, loaded 4.2.2
--- XCB (X protocol) support ok
--------------------------------------------------------------------
import PIL
img = PIL.open("image.jpg")
img.save("image.avif")As the PIL report indicates AVIF support is, apparently, not installed. However:
- PIL does log that it's importing its plugin:
DEBUG - Importing AvifImagePlugin libavifis installed on this Arch distribution (1.3.0-1)
What could the reasons be for the failing export? Could this be an issue that might need to be delegated to the maintainer of the pillow package on Arch?
Many thanks for looking into this!
P.S.: The Arch package adding support for AVIF was not installed (python-pillow-avif-plugin), so no surprise there. However, installing it still does not seem to make any difference. if it is of any help, the file contents of the avif plugin package are as follows:
python-pillow-avif-plugin /usr/
python-pillow-avif-plugin /usr/lib/
python-pillow-avif-plugin /usr/lib/python3.13/
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/AvifImagePlugin.py
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/__init__.py
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/__pycache__/
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/__pycache__/AvifImagePlugin.cpython-313.opt-1.pyc
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/__pycache__/AvifImagePlugin.cpython-313.pyc
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/__pycache__/__init__.cpython-313.opt-1.pyc
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/__pycache__/__init__.cpython-313.pyc
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif/_avif.cpython-313-x86_64-linux-gnu.so
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/METADATA
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/RECORD
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/WHEEL
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/licenses/
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/licenses/LICENSE
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/top_level.txt
python-pillow-avif-plugin /usr/lib/python3.13/site-packages/pillow_avif_plugin-1.5.2.dist-info/zip-safe
python-pillow-avif-plugin /usr/share/
python-pillow-avif-plugin /usr/share/licenses/
python-pillow-avif-plugin /usr/share/licenses/python-pillow-avif-plugin/
python-pillow-avif-plugin /usr/share/licenses/python-pillow-avif-plugin/LICENSE
P.P.S.: I seem to be seeing the same symptoms through a virtualenv (pip packages for both, pillow and avif-plugin).