Skip to content

Commit 5554e77

Browse files
committed
Removed unnecessary checks
1 parent 77f3a09 commit 5554e77

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/libImaging/AlphaComposite.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc) {
2525
int x, y;
2626

2727
/* Check arguments */
28-
if (!imDst || !imSrc || strcmp(imDst->mode, "RGBA") ||
29-
imDst->type != IMAGING_TYPE_UINT8 || imDst->bands != 4) {
28+
if (!imDst || !imSrc || strcmp(imDst->mode, "RGBA")) {
3029
return ImagingError_ModeError();
3130
}
3231

33-
if (strcmp(imDst->mode, imSrc->mode) || imDst->type != imSrc->type ||
34-
imDst->bands != imSrc->bands || imDst->xsize != imSrc->xsize ||
32+
if (strcmp(imDst->mode, imSrc->mode) || imDst->xsize != imSrc->xsize ||
3533
imDst->ysize != imSrc->ysize) {
3634
return ImagingError_Mismatch();
3735
}

0 commit comments

Comments
 (0)