mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 11:26:17 +03:00
use mode structs in Bands.c
This commit is contained in:
parent
b8cead39b3
commit
58dedbefd6
|
@ -41,7 +41,7 @@ ImagingGetBand(Imaging imIn, int band) {
|
||||||
band = 3;
|
band = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
imOut = ImagingNewDirty("L", imIn->xsize, imIn->ysize);
|
imOut = ImagingNewDirty(IMAGING_MODE_L, imIn->xsize, imIn->ysize);
|
||||||
if (!imOut) {
|
if (!imOut) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ ImagingSplit(Imaging imIn, Imaging bands[4]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < imIn->bands; i++) {
|
for (i = 0; i < imIn->bands; i++) {
|
||||||
bands[i] = ImagingNewDirty("L", imIn->xsize, imIn->ysize);
|
bands[i] = ImagingNewDirty(IMAGING_MODE_L, imIn->xsize, imIn->ysize);
|
||||||
if (!bands[i]) {
|
if (!bands[i]) {
|
||||||
for (j = 0; j < i; ++j) {
|
for (j = 0; j < i; ++j) {
|
||||||
ImagingDelete(bands[j]);
|
ImagingDelete(bands[j]);
|
||||||
|
@ -240,7 +240,7 @@ ImagingFillBand(Imaging imOut, int band, int color) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingMerge(const char *mode, Imaging bands[4]) {
|
ImagingMerge(const Mode *mode, Imaging bands[4]) {
|
||||||
int i, x, y;
|
int i, x, y;
|
||||||
int bandsCount = 0;
|
int bandsCount = 0;
|
||||||
Imaging imOut;
|
Imaging imOut;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user