mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-25 00:34:14 +03:00
Support reading signed 8-bit TIFF images
This commit is contained in:
parent
9636a2aaf1
commit
a4986ba986
BIN
Tests/images/8bit.s.tif
Normal file
BIN
Tests/images/8bit.s.tif
Normal file
Binary file not shown.
|
@ -198,6 +198,12 @@ class TestFileTiff:
|
|||
with pytest.raises(OSError):
|
||||
im.save(outfile)
|
||||
|
||||
def test_8bit_s(self):
|
||||
with Image.open("Tests/images/8bit.s.tif") as im:
|
||||
im.load()
|
||||
assert im.mode == "L"
|
||||
assert im.getpixel((50, 50)) == 184
|
||||
|
||||
def test_little_endian(self):
|
||||
with Image.open("Tests/images/16bit.cropped.tif") as im:
|
||||
assert im.getpixel((0, 0)) == 480
|
||||
|
|
|
@ -170,6 +170,8 @@ OPEN_INFO = {
|
|||
(MM, 0, (1,), 2, (8,), ()): ("L", "L;IR"),
|
||||
(II, 1, (1,), 1, (8,), ()): ("L", "L"),
|
||||
(MM, 1, (1,), 1, (8,), ()): ("L", "L"),
|
||||
(II, 1, (2,), 1, (8,), ()): ("L", "L"),
|
||||
(MM, 1, (2,), 1, (8,), ()): ("L", "L"),
|
||||
(II, 1, (1,), 2, (8,), ()): ("L", "L;R"),
|
||||
(MM, 1, (1,), 2, (8,), ()): ("L", "L;R"),
|
||||
(II, 1, (1,), 1, (12,), ()): ("I;16", "I;12"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user