mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 17:54:32 +03:00
Support and test for 4-bit greyscale TIFF
This commit is contained in:
parent
29b1c81a9e
commit
552a9a28a0
|
@ -149,6 +149,7 @@ OPEN_INFO = {
|
|||
(II, 0, 1, 2, (8,), ()): ("L", "L;IR"),
|
||||
(II, 0, 3, 1, (32,), ()): ("F", "F;32F"),
|
||||
(II, 1, 1, 1, (1,), ()): ("1", "1"),
|
||||
(II, 1, 1, 1, (4,), ()): ("L", "L;4"),
|
||||
(II, 1, 1, 2, (1,), ()): ("1", "1;R"),
|
||||
(II, 1, 1, 1, (8,), ()): ("L", "L"),
|
||||
(II, 1, 1, 1, (8, 8), (2,)): ("LA", "LA"),
|
||||
|
|
|
@ -298,6 +298,17 @@ class TestFileTiff(PillowTestCase):
|
|||
# Assert
|
||||
self.assertEqual(ret, [0, 1])
|
||||
|
||||
def test_4bit(self):
|
||||
# Arrange
|
||||
test_file = "Tests/images/hopper_gray_4bpp.tif"
|
||||
|
||||
# Act
|
||||
im = Image.open(test_file)
|
||||
|
||||
# Assert
|
||||
self.assertEqual(im.size, (128, 128))
|
||||
self.assertEqual(im.mode, "L")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user