What did you do?
Running the test suite of Pillow on Arch Linux riscv64, libavif 1.4.1 and aom 3.13.3. I can confirm they pass on x86_64 with the same setup.
What did you expect to happen?
Tests pass.
What actually happened?
a = <PIL.AvifImagePlugin.AvifImageFile image mode=RGB size=128x128 at 0x3F7DD3F770>
b = <PIL.PngImagePlugin.PngImageFile image mode=RGB size=128x128 at 0x3F88BCF610>
epsilon = 6.88, msg = None
def assert_image_similar(
a: Image.Image, b: Image.Image, epsilon: float, msg: str | None = None
) -> None:
assert a.mode == b.mode, msg or f"got mode {repr(a.mode)}, expected {repr(b.mode)}"
assert a.size == b.size, msg or f"got size {repr(a.size)}, expected {repr(b.size)}"
a, b = convert_to_comparable(a, b)
diff = 0
for ach, bch in zip(a.split(), b.split()):
chdiff = ImageMath.lambda_eval(
lambda args: abs(args["a"] - args["b"]), a=ach, b=bch
).convert("L")
diff += sum(i * num for i, num in enumerate(chdiff.histogram()))
ave_diff = diff / (a.size[0] * a.size[1])
try:
> assert epsilon >= ave_diff, (
(msg or "")
+ f" average pixel value difference {ave_diff:.4f} > epsilon {epsilon:.4f}"
)
E AssertionError: average pixel value difference 6.9274 > epsilon 6.8800
E assert 6.88 >= 6.92742919921875
Tests/helper.py:129: AssertionError
What are your OS, Python and Pillow versions?
- OS: Arch Linux riscv64
- Python: 3.14.4
- Pillow: 12.2.0
$ python3 -m PIL.report
--------------------------------------------------------------------
Pillow 12.2.0
Python 3.14.4 (main, Apr 24 2026, 21:37:53) [GCC 15.2.1 20260209]
--------------------------------------------------------------------
Python executable is /usr/bin/python3
System Python files loaded from /usr
--------------------------------------------------------------------
Python Pillow modules loaded from /usr/lib/python3.14/site-packages/PIL
Binary Pillow modules loaded from /usr/lib/python3.14/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 12.2.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.14.3
--- LITTLECMS2 support ok, loaded 2.19
--- WEBP support ok, loaded 1.6.0
--- AVIF support ok, loaded 1.4.1
--- JPEG support ok, compiled for libjpeg-turbo 3.1.4.1
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.4
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.2
--- LIBTIFF support ok, loaded 4.7.1
--- RAQM (Bidirectional Text) support ok, loaded 0.10.5
--- LIBIMAGEQUANT (Quantization method) support ok, loaded 4.2.2
--- XCB (X protocol) support ok
--------------------------------------------------------------------
What did you do?
Running the test suite of Pillow on Arch Linux riscv64, libavif 1.4.1 and aom 3.13.3. I can confirm they pass on x86_64 with the same setup.
What did you expect to happen?
Tests pass.
What actually happened?
What are your OS, Python and Pillow versions?