mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 19:06:18 +03:00
use mode structs in AlphaComposite.c
This commit is contained in:
parent
820f22c120
commit
b8cead39b3
|
@ -25,12 +25,12 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc) {
|
|||
int x, y;
|
||||
|
||||
/* Check arguments */
|
||||
if (!imDst || !imSrc || strcmp(imDst->mode, "RGBA") ||
|
||||
if (!imDst || !imSrc || imDst->mode != IMAGING_MODE_RGBA ||
|
||||
imDst->type != IMAGING_TYPE_UINT8 || imDst->bands != 4) {
|
||||
return ImagingError_ModeError();
|
||||
}
|
||||
|
||||
if (strcmp(imDst->mode, imSrc->mode) || imDst->type != imSrc->type ||
|
||||
if (imDst->mode != imSrc->mode || imDst->type != imSrc->type ||
|
||||
imDst->bands != imSrc->bands || imDst->xsize != imSrc->xsize ||
|
||||
imDst->ysize != imSrc->ysize) {
|
||||
return ImagingError_Mismatch();
|
||||
|
|
Loading…
Reference in New Issue
Block a user