mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-11-12 05:45:41 +03:00
Check against mode 1 instead of input mode for Chops.c
This commit is contained in:
parent
2b4c7c011e
commit
bd6e70fccd
|
|
@ -64,7 +64,8 @@ create(Imaging im1, Imaging im2, const ModeID mode) {
|
|||
int xsize, ysize;
|
||||
|
||||
if (!im1 || !im2 || im1->type != IMAGING_TYPE_UINT8 ||
|
||||
(mode != IMAGING_MODE_UNKNOWN && (im1->mode != mode || im2->mode != mode))) {
|
||||
(mode != IMAGING_MODE_UNKNOWN &&
|
||||
(im1->mode != IMAGING_MODE_1 || im2->mode != IMAGING_MODE_1))) {
|
||||
return (Imaging)ImagingError_ModeError();
|
||||
}
|
||||
if (im1->type != im2->type || im1->bands != im2->bands) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user