Skip to content

Commit

Permalink
Merge pull request python-pillow#7984 from radarhere/modes
Browse files Browse the repository at this point in the history
Added more modes to Image.MODES
  • Loading branch information
hugovk authored May 11, 2024
2 parents 1cdbb5f + ce8deda commit 5e48d54
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 5e48d54

Please sign in to comment.