rename roi → box in error messages

This commit is contained in:
homm 2016-12-02 16:46:54 +03:00
parent 77210e410d
commit 19527c8ba0

View File

@ -1549,15 +1549,15 @@ _resize(ImagingObject* self, PyObject* args)
} }
if (box[0] < 0 || box[1] < 0) { if (box[0] < 0 || box[1] < 0) {
return ImagingError_ValueError("region of interest offset can't be negative"); return ImagingError_ValueError("box offset can't be negative");
} }
if (box[2] > imIn->xsize || box[3] > imIn->ysize) { if (box[2] > imIn->xsize || box[3] > imIn->ysize) {
return ImagingError_ValueError("region of interest can't exceed original image size"); return ImagingError_ValueError("box can't exceed original image size");
} }
if (box[2] - box[0] <= 0 || box[3] - box[1] <= 0) { if (box[2] - box[0] <= 0 || box[3] - box[1] <= 0) {
return ImagingError_ValueError("region of interest can't be empty"); return ImagingError_ValueError("box can't be empty");
} }
if (box[0] == 0 && box[1] == 0 && box[2] == xsize && box[3] == ysize) { if (box[0] == 0 && box[1] == 0 && box[2] == xsize && box[3] == ysize) {