mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-03 22:06:18 +03:00
add special modes
This commit is contained in:
parent
abe3dfb18f
commit
1f2126bd9f
|
@ -24,6 +24,15 @@ CREATE_MODE(Mode, MODE_RGBX, {"RGBX"})
|
||||||
CREATE_MODE(Mode, MODE_RGBa, {"RGBa"})
|
CREATE_MODE(Mode, MODE_RGBa, {"RGBa"})
|
||||||
CREATE_MODE(Mode, MODE_YCbCr, {"YCbCr"})
|
CREATE_MODE(Mode, MODE_YCbCr, {"YCbCr"})
|
||||||
|
|
||||||
|
CREATE_MODE(Mode, MODE_BGR_15, {"BGR;15"})
|
||||||
|
CREATE_MODE(Mode, MODE_BGR_16, {"BGR;16"})
|
||||||
|
CREATE_MODE(Mode, MODE_BGR_24, {"BGR;24"})
|
||||||
|
|
||||||
|
CREATE_MODE(Mode, MODE_I_16, {"I;16"})
|
||||||
|
CREATE_MODE(Mode, MODE_I_16L, {"I;16L"})
|
||||||
|
CREATE_MODE(Mode, MODE_I_16B, {"I;16B"})
|
||||||
|
CREATE_MODE(Mode, MODE_I_16N, {"I;16N"})
|
||||||
|
|
||||||
const Mode * const MODES[] = {
|
const Mode * const MODES[] = {
|
||||||
IMAGING_MODE_1,
|
IMAGING_MODE_1,
|
||||||
IMAGING_MODE_CMYK,
|
IMAGING_MODE_CMYK,
|
||||||
|
@ -41,6 +50,16 @@ const Mode * const MODES[] = {
|
||||||
IMAGING_MODE_RGBX,
|
IMAGING_MODE_RGBX,
|
||||||
IMAGING_MODE_RGBa,
|
IMAGING_MODE_RGBa,
|
||||||
IMAGING_MODE_YCbCr,
|
IMAGING_MODE_YCbCr,
|
||||||
|
|
||||||
|
IMAGING_MODE_BGR_15,
|
||||||
|
IMAGING_MODE_BGR_16,
|
||||||
|
IMAGING_MODE_BGR_24,
|
||||||
|
|
||||||
|
IMAGING_MODE_I_16,
|
||||||
|
IMAGING_MODE_I_16L,
|
||||||
|
IMAGING_MODE_I_16B,
|
||||||
|
IMAGING_MODE_I_16N,
|
||||||
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,8 +94,14 @@ ALIAS_MODE_AS_RAWMODE(RGBX)
|
||||||
ALIAS_MODE_AS_RAWMODE(RGBa)
|
ALIAS_MODE_AS_RAWMODE(RGBa)
|
||||||
ALIAS_MODE_AS_RAWMODE(YCbCr)
|
ALIAS_MODE_AS_RAWMODE(YCbCr)
|
||||||
|
|
||||||
CREATE_MODE(RawMode, RAWMODE_BGR_15, {"BGR;15"})
|
ALIAS_MODE_AS_RAWMODE(BGR_15)
|
||||||
CREATE_MODE(RawMode, RAWMODE_BGR_16, {"BGR;16"})
|
ALIAS_MODE_AS_RAWMODE(BGR_16)
|
||||||
|
ALIAS_MODE_AS_RAWMODE(BGR_24)
|
||||||
|
|
||||||
|
ALIAS_MODE_AS_RAWMODE(I_16)
|
||||||
|
ALIAS_MODE_AS_RAWMODE(I_16L)
|
||||||
|
ALIAS_MODE_AS_RAWMODE(I_16B)
|
||||||
|
ALIAS_MODE_AS_RAWMODE(I_16N)
|
||||||
|
|
||||||
const RawMode * const RAWMODES[] = {
|
const RawMode * const RAWMODES[] = {
|
||||||
IMAGING_RAWMODE_1,
|
IMAGING_RAWMODE_1,
|
||||||
|
@ -98,6 +123,12 @@ const RawMode * const RAWMODES[] = {
|
||||||
|
|
||||||
IMAGING_RAWMODE_BGR_15,
|
IMAGING_RAWMODE_BGR_15,
|
||||||
IMAGING_RAWMODE_BGR_16,
|
IMAGING_RAWMODE_BGR_16,
|
||||||
|
IMAGING_RAWMODE_BGR_24,
|
||||||
|
|
||||||
|
IMAGING_RAWMODE_I_16,
|
||||||
|
IMAGING_RAWMODE_I_16L,
|
||||||
|
IMAGING_RAWMODE_I_16B,
|
||||||
|
IMAGING_RAWMODE_I_16N,
|
||||||
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,6 +27,15 @@ extern const Mode * const IMAGING_MODE_RGBX;
|
||||||
extern const Mode * const IMAGING_MODE_RGBa;
|
extern const Mode * const IMAGING_MODE_RGBa;
|
||||||
extern const Mode * const IMAGING_MODE_YCbCr;
|
extern const Mode * const IMAGING_MODE_YCbCr;
|
||||||
|
|
||||||
|
extern const Mode * const IMAGING_MODE_BGR_15;
|
||||||
|
extern const Mode * const IMAGING_MODE_BGR_16;
|
||||||
|
extern const Mode * const IMAGING_MODE_BGR_24;
|
||||||
|
|
||||||
|
extern const Mode * const IMAGING_MODE_I_16;
|
||||||
|
extern const Mode * const IMAGING_MODE_I_16L;
|
||||||
|
extern const Mode * const IMAGING_MODE_I_16B;
|
||||||
|
extern const Mode * const IMAGING_MODE_I_16N;
|
||||||
|
|
||||||
const Mode * findMode(const char * const name);
|
const Mode * findMode(const char * const name);
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,6 +62,13 @@ extern const RawMode * const IMAGING_RAWMODE_YCbCr;
|
||||||
|
|
||||||
extern const RawMode * const IMAGING_RAWMODE_BGR_15;
|
extern const RawMode * const IMAGING_RAWMODE_BGR_15;
|
||||||
extern const RawMode * const IMAGING_RAWMODE_BGR_16;
|
extern const RawMode * const IMAGING_RAWMODE_BGR_16;
|
||||||
|
extern const RawMode * const IMAGING_RAWMODE_BGR_24;
|
||||||
|
extern const RawMode * const IMAGING_RAWMODE_BGR_32;
|
||||||
|
|
||||||
|
extern const RawMode * const IMAGING_RAWMODE_I_16;
|
||||||
|
extern const RawMode * const IMAGING_RAWMODE_I_16L;
|
||||||
|
extern const RawMode * const IMAGING_RAWMODE_I_16B;
|
||||||
|
extern const RawMode * const IMAGING_RAWMODE_I_16N;
|
||||||
|
|
||||||
const RawMode * findRawMode(const char * const name);
|
const RawMode * findRawMode(const char * const name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user