Add test against info of apng images getting clobbered when seeking to the first frame multiple times.

This commit is contained in:
Erik Soma 2024-01-07 20:42:52 -05:00
parent 6d99f9193f
commit 3515f997ce
2 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

View File

@ -689,3 +689,13 @@ def test_different_modes_in_later_frames(mode, default_image, duplicate, tmp_pat
)
with Image.open(test_file) as reloaded:
assert reloaded.mode == mode
def test_apng_issue_7700():
# https://github.com/python-pillow/Pillow/issues/7700
with Image.open("Tests/images/apng/issue_7700.png") as im:
for i in range(5):
im.seek(0)
assert im.info["duration"] == 4000.0
im.seek(1)
assert im.info["duration"] == 1000.0