From 26b59b641911a578cf29c210fbef73f4c6d7b499 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Mon, 7 Oct 2024 11:33:11 +0800 Subject: [PATCH] add is_animated even not support --- pillow_jxl/JpegXLImagePlugin.py | 3 +++ test/test_plugin.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pillow_jxl/JpegXLImagePlugin.py b/pillow_jxl/JpegXLImagePlugin.py index a07aa41..158738c 100644 --- a/pillow_jxl/JpegXLImagePlugin.py +++ b/pillow_jxl/JpegXLImagePlugin.py @@ -41,6 +41,9 @@ def _open(self): self._mode = self.rawmode else: self.mode = self.rawmode + # FIXME (Isotr0py): animation JXL hasn't supported yet + self.is_animated = False + self.n_frames = 1 self.tile = [] diff --git a/test/test_plugin.py b/test/test_plugin.py index 034881c..a94db8a 100644 --- a/test/test_plugin.py +++ b/test/test_plugin.py @@ -11,6 +11,8 @@ def test_decode(): assert img.size == (40, 50) assert img.mode == "RGBA" + assert not img.is_animated + assert img.n_frames == 1 @pytest.mark.parametrize("image", ["test/images/sample.png", "test/images/sample.jpg"])