mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Do not clear tile if not updating the image when seeking
This commit is contained in:
parent
446446f579
commit
0844fb0ed3
BIN
Tests/images/comment_after_only_frame.gif
Normal file
BIN
Tests/images/comment_after_only_frame.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 B |
|
@ -399,6 +399,11 @@ def test_no_change():
|
|||
assert im.is_animated
|
||||
assert_image_equal(im, expected)
|
||||
|
||||
with Image.open("Tests/images/comment_after_only_frame.gif") as im:
|
||||
expected = Image.new("P", (1, 1))
|
||||
assert not im.is_animated
|
||||
assert_image_equal(im, expected)
|
||||
|
||||
|
||||
def test_eoferror():
|
||||
with Image.open(TEST_GIF) as im:
|
||||
|
|
|
@ -185,8 +185,6 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
if not s or s == b";":
|
||||
raise EOFError
|
||||
|
||||
self.tile = []
|
||||
|
||||
palette = None
|
||||
|
||||
info = {}
|
||||
|
@ -295,6 +293,8 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
if not update_image:
|
||||
return
|
||||
|
||||
self.tile = []
|
||||
|
||||
if self.dispose:
|
||||
self.im.paste(self.dispose, self.dispose_extent)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user