mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Added 4bit test to libtiff as well
This commit is contained in:
parent
8cb5688047
commit
2d2474685a
|
@ -342,6 +342,24 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
im.load()
|
im.load()
|
||||||
self.assertFalse(im.tag.next)
|
self.assertFalse(im.tag.next)
|
||||||
|
|
||||||
|
def test_4bit(self):
|
||||||
|
# Arrange
|
||||||
|
test_file = "Tests/images/hopper_gray_4bpp.tif"
|
||||||
|
original = hopper("L")
|
||||||
|
|
||||||
|
# Act
|
||||||
|
TiffImagePlugin.READ_LIBTIFF = True
|
||||||
|
im = Image.open(test_file)
|
||||||
|
TiffImagePlugin.READ_LIBTIFF = False
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
self.assertEqual(im.size, (128, 128))
|
||||||
|
self.assertEqual(im.mode, "L")
|
||||||
|
self.assert_image_similar(im, original, 7.3)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user