revise tests for new libnsgif loop behaviour

see https://github.com/libvips/libvips/pull/2712
This commit is contained in:
John Cupitt 2022-03-09 10:20:41 +00:00
parent 292ee9a47e
commit 356edc3779
1 changed files with 4 additions and 3 deletions

View File

@ -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)