mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
Resolved error for comment extension with zero subblocks
This commit is contained in:
parent
080bfd3ee1
commit
f1b2802eb1
BIN
Tests/images/hopper_zero_comment_subblocks.gif
Normal file
BIN
Tests/images/hopper_zero_comment_subblocks.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -435,6 +435,11 @@ class TestFileGif(PillowTestCase):
|
|||
|
||||
self.assertEqual(reread.info['comment'], im.info['comment'])
|
||||
|
||||
def test_zero_comment_subblocks(self):
|
||||
im = Image.open('Tests/images/hopper_zero_comment_subblocks.gif')
|
||||
expected = Image.open(TEST_GIF)
|
||||
self.assert_image_equal(im, expected)
|
||||
|
||||
def test_version(self):
|
||||
out = self.tempfile('temp.gif')
|
||||
|
||||
|
|
|
@ -202,6 +202,8 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
# comment extension
|
||||
#
|
||||
info["comment"] = block
|
||||
if not block:
|
||||
continue
|
||||
elif i8(s) == 255:
|
||||
#
|
||||
# application extension
|
||||
|
|
Loading…
Reference in New Issue
Block a user