Drop YCbCrX(XX) modes, as TIFF does not have to support that

This commit is contained in:
Konstantin Kopachev 2018-09-11 09:26:25 -07:00
parent f874e6f058
commit 187782470b
No known key found for this signature in database
GPG Key ID: CECF757E656F4F62
4 changed files with 1 additions and 20 deletions

View File

@ -151,10 +151,6 @@ class TestLibPack(PillowTestCase):
self.assert_pack("YCbCr", "YCbCr", 3, (1, 2, 3), (4, 5, 6), (7, 8, 9))
self.assert_pack("YCbCr", "YCbCr;L", 3,
(1, 4, 7), (2, 5, 8), (3, 6, 9))
self.assert_pack(
"YCbCr", "YCbCrX",
b'\x01\x02\x03\xff\x05\x06\x07\xff\t\n\x0b\xff',
(1, 2, 3), (5, 6, 7), (9, 10, 11))
self.assert_pack(
"YCbCr", "YCbCrK",
b'\x01\x02\x03\xff\x05\x06\x07\xff\t\n\x0b\xff',
@ -471,12 +467,6 @@ class TestLibUnpack(PillowTestCase):
"YCbCr", "YCbCr;L", 3, (1, 4, 7), (2, 5, 8), (3, 6, 9))
self.assert_unpack(
"YCbCr", "YCbCrK", 4, (1, 2, 3), (5, 6, 7), (9, 10, 11))
self.assert_unpack(
"YCbCr", "YCbCrX", 4, (1, 2, 3), (5, 6, 7), (9, 10, 11))
self.assert_unpack(
"YCbCr", "YCbCrXX", 5, (1, 2, 3), (6, 7, 8), (11, 12, 13))
self.assert_unpack(
"YCbCr", "YCbCrXXX", 6, (1, 2, 3), (7, 8, 9), (13, 14, 15))
def test_LAB(self):
self.assert_unpack(

View File

@ -258,14 +258,9 @@ OPEN_INFO = {
(MM, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
# JPEG compressed images handled by LibTiff and auto-converted to RGB
# Minimal Baseline TIFF requires YCbCr images to have 3 SamplesPerPixel
(II, 6, (1,), 1, (8, 8, 8), ()): ("RGB", "RGB"),
(MM, 6, (1,), 1, (8, 8, 8), ()): ("RGB", "RGB"),
(II, 6, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGB"),
(MM, 6, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGB"),
(II, 6, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGB"),
(MM, 6, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGB"),
(II, 6, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGB"),
(MM, 6, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGB"),
(II, 8, (1,), 1, (8, 8, 8), ()): ("LAB", "LAB"),
(MM, 8, (1,), 1, (8, 8, 8), ()): ("LAB", "LAB"),

View File

@ -608,7 +608,6 @@ static struct {
/* video (YCbCr) */
{"YCbCr", "YCbCr", 24, ImagingPackRGB},
{"YCbCr", "YCbCr;L", 24, packRGBL},
{"YCbCr", "YCbCrX", 32, copy4},
{"YCbCr", "YCbCrK", 32, copy4},
{"YCbCr", "Y", 8, band0},
{"YCbCr", "Cb", 8, band1},

View File

@ -1428,9 +1428,6 @@ static struct {
/* video (YCbCr) */
{"YCbCr", "YCbCr", 24, ImagingUnpackRGB},
{"YCbCr", "YCbCr;L", 24, unpackRGBL},
{"YCbCr", "YCbCrX", 32, copy4},
{"YCbCr", "YCbCrXX", 40, copy4skip1},
{"YCbCr", "YCbCrXXX", 48, copy4skip2},
{"YCbCr", "YCbCrK", 32, copy4},
/* LAB Color */