Test TIF with LZW compression

This commit is contained in:
hugovk 2016-04-21 23:10:08 +03:00
parent 272f11434d
commit 311f8f6a9c

View File

@ -450,6 +450,18 @@ class TestFileTiff(PillowTestCase):
# Should not raise UnicodeDecodeError or anything else # Should not raise UnicodeDecodeError or anything else
im.save(outfile) im.save(outfile)
def test_lzw(self):
# Act
im = Image.open("Tests/images/hopper_lzw.tif")
# Assert
self.assertEqual(im.mode, 'RGB')
self.assertEqual(im.size, (128, 128))
self.assertEqual(im.format, "TIFF")
im2 = hopper()
self.assert_image_similar(im, im2, 5)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()