mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Dropped support for BGR;32 mode
This commit is contained in:
parent
079caf6711
commit
9e6ae98362
|
@ -58,7 +58,7 @@ class TestImage:
|
|||
Image.new(mode, (1, 1))
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"mode", ("", "bad", "very very long", "BGR;15", "BGR;16", "BGR;24", "BGR;32")
|
||||
"mode", ("", "bad", "very very long", "BGR;15", "BGR;16", "BGR;24")
|
||||
)
|
||||
def test_image_modes_fail(self, mode):
|
||||
with pytest.raises(ValueError) as e:
|
||||
|
|
|
@ -62,7 +62,6 @@ Pillow also provides limited support for a few additional modes, including:
|
|||
* ``BGR;15`` (15-bit reversed true colour)
|
||||
* ``BGR;16`` (16-bit reversed true colour)
|
||||
* ``BGR;24`` (24-bit reversed true colour)
|
||||
* ``BGR;32`` (32-bit reversed true colour)
|
||||
|
||||
Premultiplied alpha is where the values for each other channel have been
|
||||
multiplied by the alpha. For example, an RGBA pixel of ``(10, 20, 30, 127)``
|
||||
|
|
|
@ -61,7 +61,6 @@ def getmode(mode):
|
|||
"BGR;15": ("RGB", "L", ("B", "G", "R"), endian + "u2"),
|
||||
"BGR;16": ("RGB", "L", ("B", "G", "R"), endian + "u2"),
|
||||
"BGR;24": ("RGB", "L", ("B", "G", "R"), endian + "u3"),
|
||||
"BGR;32": ("RGB", "L", ("B", "G", "R"), endian + "u4"),
|
||||
"LA": ("L", "L", ("L", "A"), "|u1"),
|
||||
"La": ("L", "L", ("L", "a"), "|u1"),
|
||||
"PA": ("RGB", "L", ("P", "A"), "|u1"),
|
||||
|
|
|
@ -152,14 +152,6 @@ ImagingNewPrologueSubtype(const char *mode, int xsize, int ysize, int size) {
|
|||
im->linesize = (xsize * 3 + 3) & -4;
|
||||
im->type = IMAGING_TYPE_SPECIAL;
|
||||
|
||||
} else if (strcmp(mode, "BGR;32") == 0) {
|
||||
/* EXPERIMENTAL */
|
||||
/* 32-bit reversed true colour */
|
||||
im->bands = 1;
|
||||
im->pixelsize = 4;
|
||||
im->linesize = (xsize * 4 + 3) & -4;
|
||||
im->type = IMAGING_TYPE_SPECIAL;
|
||||
|
||||
} else if (strcmp(mode, "RGBX") == 0) {
|
||||
/* 32-bit true colour images with padding */
|
||||
im->bands = im->pixelsize = 4;
|
||||
|
|
Loading…
Reference in New Issue
Block a user