final set of special cases

This commit is contained in:
Alexander 2019-11-25 23:34:52 +03:00
parent e6c305511e
commit fba833e1f4
2 changed files with 384 additions and 821 deletions

View File

@ -1846,7 +1846,11 @@ _reduce(ImagingObject* self, PyObject* args)
return ImagingError_ValueError("scale must be > 0");
}
imOut = ImagingReduce(imIn, xscale, yscale);
if (xscale == 1 && yscale == 1) {
imOut = ImagingCopy(imIn);
} else {
imOut = ImagingReduce(imIn, xscale, yscale);
}
return PyImagingNew(imOut);
}

File diff suppressed because it is too large Load Diff