diff --git a/Tests/images/issue_2811.gif b/Tests/images/issue_2811.gif new file mode 100644 index 000000000..a32ba0bce Binary files /dev/null and b/Tests/images/issue_2811.gif differ diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 0b52d7b44..bc53895e8 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -536,6 +536,13 @@ class TestFileGif(PillowTestCase): finally: GifImagePlugin._FORCE_OPTIMIZE = False + def test_lzw_bits(self): + # see https://github.com/python-pillow/Pillow/issues/2811 + im = Image.open('Tests/images/issue_2811.gif') + + self.assertEqual(im.tile[0][3][0], 11) # LZW bits + # codec error prepatch + im.load() if __name__ == '__main__': unittest.main()