use mode structs in AlphaComposite.c

This commit is contained in:
Yay295 2024-04-21 13:09:47 -05:00
parent 820f22c120
commit b8cead39b3

View File

@ -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();