mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-01 21:06:16 +03:00
Read images as RGB, rather than RGBX
This commit is contained in:
parent
f8160b858a
commit
98a0515494
|
@ -78,7 +78,7 @@ OPEN = {
|
|||
"LA image": ("LA", "LA;L"),
|
||||
"PA image": ("LA", "PA;L"),
|
||||
"RGBA image": ("RGBA", "RGBA;L"),
|
||||
"RGBX image": ("RGBX", "RGBX;L"),
|
||||
"RGBX image": ("RGB", "RGBX;L"),
|
||||
"CMYK image": ("CMYK", "CMYK;L"),
|
||||
"YCC image": ("YCbCr", "YCbCr;L"),
|
||||
}
|
||||
|
|
|
@ -200,12 +200,12 @@ OPEN_INFO = {
|
|||
(MM, 2, (1,), 2, (8, 8, 8), ()): ("RGB", "RGB;R"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8), ()): ("RGBA", "RGBA"), # missing ExtraSamples
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8), ()): ("RGBA", "RGBA"), # missing ExtraSamples
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGBX", "RGBX"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGBX", "RGBX"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGBX", "RGBXX"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGBX", "RGBXX"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGBX", "RGBXXX"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGBX", "RGBXXX"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGBX"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGBX"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGBXX"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGBXX"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGBXXX"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGBXXX"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8), (1,)): ("RGBA", "RGBa"),
|
||||
(MM, 2, (1,), 1, (8, 8, 8, 8), (1,)): ("RGBA", "RGBa"),
|
||||
(II, 2, (1,), 1, (8, 8, 8, 8, 8), (1, 0)): ("RGBA", "RGBaX"),
|
||||
|
@ -224,8 +224,8 @@ OPEN_INFO = {
|
|||
(MM, 2, (1,), 1, (16, 16, 16), ()): ("RGB", "RGB;16B"),
|
||||
(II, 2, (1,), 1, (16, 16, 16, 16), ()): ("RGBA", "RGBA;16L"),
|
||||
(MM, 2, (1,), 1, (16, 16, 16, 16), ()): ("RGBA", "RGBA;16B"),
|
||||
(II, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGBX", "RGBX;16L"),
|
||||
(MM, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGBX", "RGBX;16B"),
|
||||
(II, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGB", "RGBX;16L"),
|
||||
(MM, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGB", "RGBX;16B"),
|
||||
(II, 2, (1,), 1, (16, 16, 16, 16), (1,)): ("RGBA", "RGBa;16L"),
|
||||
(MM, 2, (1,), 1, (16, 16, 16, 16), (1,)): ("RGBA", "RGBa;16B"),
|
||||
(II, 2, (1,), 1, (16, 16, 16, 16), (2,)): ("RGBA", "RGBA;16L"),
|
||||
|
|
|
@ -1599,10 +1599,14 @@ static struct {
|
|||
{"RGB", "BGR;15", 16, ImagingUnpackBGR15},
|
||||
{"RGB", "RGB;16", 16, ImagingUnpackRGB16},
|
||||
{"RGB", "BGR;16", 16, ImagingUnpackBGR16},
|
||||
{"RGB", "RGBX;16L", 64, unpackRGBA16L},
|
||||
{"RGB", "RGBX;16B", 64, unpackRGBA16B},
|
||||
{"RGB", "RGB;4B", 16, ImagingUnpackRGB4B},
|
||||
{"RGB", "BGR;5", 16, ImagingUnpackBGR15}, /* compat */
|
||||
{"RGB", "RGBX", 32, copy4},
|
||||
{"RGB", "RGBX;L", 32, unpackRGBAL},
|
||||
{"RGB", "RGBXX", 40, copy4skip1},
|
||||
{"RGB", "RGBXXX", 48, copy4skip2},
|
||||
{"RGB", "RGBA;L", 32, unpackRGBAL},
|
||||
{"RGB", "RGBA;15", 16, ImagingUnpackRGBA15},
|
||||
{"RGB", "BGRX", 32, ImagingUnpackBGRX},
|
||||
|
|
Loading…
Reference in New Issue
Block a user