mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-15 06:07:33 +03:00
Simplified code
This commit is contained in:
parent
27c1bb2654
commit
feeceb9ae6
|
@ -62,11 +62,8 @@ apply(PyObject *self, PyObject *args) {
|
||||||
width = imgin->xsize;
|
width = imgin->xsize;
|
||||||
height = imgin->ysize;
|
height = imgin->ysize;
|
||||||
|
|
||||||
if (imgin->type != IMAGING_TYPE_UINT8 || imgin->bands != 1) {
|
if (imgin->type != IMAGING_TYPE_UINT8 || imgin->bands != 1 ||
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
|
imgout->type != IMAGING_TYPE_UINT8 || imgout->bands != 1) {
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (imgout->type != IMAGING_TYPE_UINT8 || imgout->bands != 1) {
|
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
|
PyErr_SetString(PyExc_RuntimeError, "Unsupported image type");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user