Skip to content

Commit

Permalink
Merge pull request #8445 from radarhere/apply
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 7, 2024
2 parents 026181e + feeceb9 commit 029ec85
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/_imagingmorph.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ apply(PyObject *self, PyObject *args) {
width = imgin->xsize;
height = imgin->ysize;

if (imgin->type != IMAGING_TYPE_UINT8 || imgin->bands != 1) {
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
return NULL;
}
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) {
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
return NULL;
}
Expand Down

0 comments on commit 029ec85

Please sign in to comment.