Bring back YCbCrX in pack and unpack

This commit is contained in:
Konstantin Kopachev 2018-09-25 11:46:32 -07:00
parent 187782470b
commit 300bdaad9e
No known key found for this signature in database
GPG Key ID: CECF757E656F4F62
3 changed files with 8 additions and 0 deletions

View File

@ -151,6 +151,10 @@ 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',
@ -467,6 +471,8 @@ 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))
def test_LAB(self):
self.assert_unpack(

View File

@ -608,6 +608,7 @@ 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,6 +1428,7 @@ static struct {
/* video (YCbCr) */
{"YCbCr", "YCbCr", 24, ImagingUnpackRGB},
{"YCbCr", "YCbCr;L", 24, unpackRGBL},
{"YCbCr", "YCbCrX", 32, copy4},
{"YCbCr", "YCbCrK", 32, copy4},
/* LAB Color */