From 356edc3779c254fe9515fff38443da9827cf0f82 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 9 Mar 2022 10:20:41 +0000 Subject: [PATCH] revise tests for new libnsgif loop behaviour see https://github.com/libvips/libvips/pull/2712 --- test/test-suite/test_foreign.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test-suite/test_foreign.py b/test/test-suite/test_foreign.py index 0e78fe29..e8fe0901 100644 --- a/test/test-suite/test_foreign.py +++ b/test/test-suite/test_foreign.py @@ -909,10 +909,10 @@ class TestForeign: x2 = pyvips.Image.new_from_file(GIF_ANIM_FILE, n=-1) # our test gif has delay 0 for the first frame set in error assert x2.get("delay") == [0, 50, 50, 50, 50] - assert x2.get("loop") == 32760 + assert x2.get("loop") == 32761 assert x2.get("background") == [255, 255, 255] # test deprecated fields too - assert x2.get("gif-loop") == 32759 + assert x2.get("gif-loop") == 32760 assert x2.get("gif-delay") == 0 # test every pixel @@ -1346,7 +1346,8 @@ class TestForeign: assert x1.get("n-pages") == x2.get("n-pages") assert x1.get("delay") == x2.get("delay") assert x1.get("page-height") == x2.get("page-height") - assert x1.get("loop") == x2.get("loop") + # FIXME ... this requires cgif0.3 or later for fixed loop support + # assert x1.get("loop") == x2.get("loop") # Reducing dither will typically reduce file size (and quality) little_dither = self.colour.gifsave_buffer(dither=0.1, effort=1)