mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 11:26:17 +03:00
rename roi → box in error messages
This commit is contained in:
parent
77210e410d
commit
19527c8ba0
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user