mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Add test for multipage tiff file with different compression
This commit is contained in:
parent
886a7cf206
commit
33fff9e4a8
BIN
Tests/images/compression.tif
Executable file
BIN
Tests/images/compression.tif
Executable file
Binary file not shown.
|
@ -378,6 +378,22 @@ class TestFileTiff(PillowTestCase):
|
|||
self.assertEqual(im.tag_v2[X_RESOLUTION], 36)
|
||||
self.assertEqual(im.tag_v2[Y_RESOLUTION], 72)
|
||||
|
||||
def test_multipage_compression(self):
|
||||
im = Image.open('Tests/images/compression.tif')
|
||||
|
||||
im.seek(0)
|
||||
self.assertEqual(im._compression,'tiff_ccitt')
|
||||
self.assertEqual(im.size, (10, 10))
|
||||
|
||||
im.seek(1)
|
||||
self.assertEqual(im._compression,'packbits')
|
||||
self.assertEqual(im.size, (10, 10))
|
||||
im.load()
|
||||
|
||||
im.seek(0)
|
||||
self.assertEqual(im._compression,'tiff_ccitt')
|
||||
self.assertEqual(im.size, (10, 10))
|
||||
im.load()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user