Skip to content

Commit 029ec85

Browse files
authored
Merge pull request #8445 from radarhere/apply
2 parents 026181e + feeceb9 commit 029ec85

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/_imagingmorph.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,8 @@ apply(PyObject *self, PyObject *args) {
6262
width = imgin->xsize;
6363
height = imgin->ysize;
6464

65-
if (imgin->type != IMAGING_TYPE_UINT8 || imgin->bands != 1) {
66-
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
67-
return NULL;
68-
}
69-
if (imgout->type != IMAGING_TYPE_UINT8 || imgout->bands != 1) {
65+
if (imgin->type != IMAGING_TYPE_UINT8 || imgin->bands != 1 ||
66+
imgout->type != IMAGING_TYPE_UINT8 || imgout->bands != 1) {
7067
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
7168
return NULL;
7269
}

0 commit comments

Comments
 (0)