We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 026181e + feeceb9 commit 029ec85Copy full SHA for 029ec85
src/_imagingmorph.c
@@ -62,11 +62,8 @@ apply(PyObject *self, PyObject *args) {
62
width = imgin->xsize;
63
height = imgin->ysize;
64
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) {
+ if (imgin->type != IMAGING_TYPE_UINT8 || imgin->bands != 1 ||
+ imgout->type != IMAGING_TYPE_UINT8 || imgout->bands != 1) {
70
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
71
return NULL;
72
}
0 commit comments