mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Added reading of CMYK;16L TIFF images
This commit is contained in:
parent
6d5b8926be
commit
ca0d28eae5
BIN
Tests/images/tiff_strip_cmyk_16l_jpeg.tif
Normal file
BIN
Tests/images/tiff_strip_cmyk_16l_jpeg.tif
Normal file
Binary file not shown.
|
@ -687,6 +687,12 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
|
|
||||||
self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 0.5)
|
self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 0.5)
|
||||||
|
|
||||||
|
def test_strip_cmyk_16l_jpeg(self):
|
||||||
|
infile = "Tests/images/tiff_strip_cmyk_16l_jpeg.tif"
|
||||||
|
im = Image.open(infile)
|
||||||
|
|
||||||
|
self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 0.5)
|
||||||
|
|
||||||
def test_strip_ycbcr_jpeg_2x2_sampling(self):
|
def test_strip_ycbcr_jpeg_2x2_sampling(self):
|
||||||
infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif"
|
infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif"
|
||||||
im = Image.open(infile)
|
im = Image.open(infile)
|
||||||
|
|
|
@ -263,6 +263,8 @@ OPEN_INFO = {
|
||||||
(II, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
|
(II, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
|
||||||
(MM, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
|
(MM, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
|
||||||
|
|
||||||
|
(II, 5, (1,), 1, (16, 16, 16, 16), ()): ("CMYK", "CMYK;16L"),
|
||||||
|
|
||||||
# JPEG compressed images handled by LibTiff and auto-converted to RGBX
|
# JPEG compressed images handled by LibTiff and auto-converted to RGBX
|
||||||
# Minimal Baseline TIFF requires YCbCr images to have 3 SamplesPerPixel
|
# Minimal Baseline TIFF requires YCbCr images to have 3 SamplesPerPixel
|
||||||
(II, 6, (1,), 1, (8, 8, 8), ()): ("RGB", "RGBX"),
|
(II, 6, (1,), 1, (8, 8, 8), ()): ("RGB", "RGBX"),
|
||||||
|
|
|
@ -1417,6 +1417,7 @@ static struct {
|
||||||
{"CMYK", "CMYKXX", 48, copy4skip2},
|
{"CMYK", "CMYKXX", 48, copy4skip2},
|
||||||
{"CMYK", "CMYK;I", 32, unpackCMYKI},
|
{"CMYK", "CMYK;I", 32, unpackCMYKI},
|
||||||
{"CMYK", "CMYK;L", 32, unpackRGBAL},
|
{"CMYK", "CMYK;L", 32, unpackRGBAL},
|
||||||
|
{"CMYK", "CMYK;16L", 64, unpackRGBA16L},
|
||||||
{"CMYK", "C", 8, band0},
|
{"CMYK", "C", 8, band0},
|
||||||
{"CMYK", "M", 8, band1},
|
{"CMYK", "M", 8, band1},
|
||||||
{"CMYK", "Y", 8, band2},
|
{"CMYK", "Y", 8, band2},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user