Skip to content

Commit bd6e70f

Browse files
committed
Check against mode 1 instead of input mode for Chops.c
1 parent 2b4c7c0 commit bd6e70f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libImaging/Chops.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ create(Imaging im1, Imaging im2, const ModeID mode) {
6464
int xsize, ysize;
6565

6666
if (!im1 || !im2 || im1->type != IMAGING_TYPE_UINT8 ||
67-
(mode != IMAGING_MODE_UNKNOWN && (im1->mode != mode || im2->mode != mode))) {
67+
(mode != IMAGING_MODE_UNKNOWN &&
68+
(im1->mode != IMAGING_MODE_1 || im2->mode != IMAGING_MODE_1))) {
6869
return (Imaging)ImagingError_ModeError();
6970
}
7071
if (im1->type != im2->type || im1->bands != im2->bands) {

0 commit comments

Comments
 (0)