mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
Include units
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
d49ea37811
commit
658b60e3a3
|
@ -164,7 +164,7 @@ class TestFileWebp:
|
||||||
with pytest.raises(ValueError) as e:
|
with pytest.raises(ValueError) as e:
|
||||||
im.save(temp_file)
|
im.save(temp_file)
|
||||||
assert (
|
assert (
|
||||||
str(e.value) == "encoding error 5: Image size exceeds WebP limit of 16383"
|
str(e.value) == "encoding error 5: Image size exceeds WebP limit of 16383 pixels"
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_WebPEncode_with_invalid_args(self) -> None:
|
def test_WebPEncode_with_invalid_args(self) -> None:
|
||||||
|
|
|
@ -676,7 +676,7 @@ WebPEncode_wrapper(PyObject *self, PyObject *args) {
|
||||||
char message[50] = "";
|
char message[50] = "";
|
||||||
if (error_code == VP8_ENC_ERROR_BAD_DIMENSION) {
|
if (error_code == VP8_ENC_ERROR_BAD_DIMENSION) {
|
||||||
sprintf(
|
sprintf(
|
||||||
message, ": Image size exceeds WebP limit of %d", WEBP_MAX_DIMENSION
|
message, ": Image size exceeds WebP limit of %d pixels", WEBP_MAX_DIMENSION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
PyErr_Format(PyExc_ValueError, "encoding error %d%s", error_code, message);
|
PyErr_Format(PyExc_ValueError, "encoding error %d%s", error_code, message);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user