mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 13:14:27 +03:00
Merge pull request #7701 from esoma/issue-7700
This commit is contained in:
commit
fc67ee29d5
BIN
Tests/images/apng/different_durations.png
Normal file
BIN
Tests/images/apng/different_durations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 B |
|
@ -689,3 +689,12 @@ 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_repeated_seeks_give_correct_info() -> None:
|
||||
with Image.open("Tests/images/apng/different_durations.png") as im:
|
||||
for i in range(3):
|
||||
im.seek(0)
|
||||
assert im.info["duration"] == 4000
|
||||
im.seek(1)
|
||||
assert im.info["duration"] == 1000
|
||||
|
|
|
@ -378,7 +378,7 @@ class PngStream(ChunkStream):
|
|||
}
|
||||
|
||||
def rewind(self):
|
||||
self.im_info = self.rewind_state["info"]
|
||||
self.im_info = self.rewind_state["info"].copy()
|
||||
self.im_tile = self.rewind_state["tile"]
|
||||
self._seq_num = self.rewind_state["seq_num"]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user