Merge pull request #7984 from radarhere/modes

Added more modes to Image.MODES
This commit is contained in:
Hugo van Kemenade 2024-05-11 23:01:42 +03:00 committed by GitHub
commit 5e48d54769
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -249,7 +249,28 @@ def _conv_type_shape(im):
return shape, m.typestr
MODES = ["1", "CMYK", "F", "HSV", "I", "L", "LAB", "P", "RGB", "RGBA", "RGBX", "YCbCr"]
MODES = [
"1",
"CMYK",
"F",
"HSV",
"I",
"I;16",
"I;16B",
"I;16L",
"I;16N",
"L",
"LA",
"La",
"LAB",
"P",
"PA",
"RGB",
"RGBA",
"RGBa",
"RGBX",
"YCbCr",
]
# raw modes that may be memory mapped. NOTE: if you change this, you
# may have to modify the stride calculation in map.c too!