From b8cead39b3c643472e129994b9c18b135d9fff32 Mon Sep 17 00:00:00 2001 From: Yay295 Date: Sun, 21 Apr 2024 13:09:47 -0500 Subject: [PATCH] use mode structs in AlphaComposite.c --- src/libImaging/AlphaComposite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libImaging/AlphaComposite.c b/src/libImaging/AlphaComposite.c index 6d728f908..8d6ee8862 100644 --- a/src/libImaging/AlphaComposite.c +++ b/src/libImaging/AlphaComposite.c @@ -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();