Include units

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
Andrew Murray 2024-08-24 21:26:56 +10:00 committed by GitHub
parent d49ea37811
commit 658b60e3a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ class TestFileWebp:
with pytest.raises(ValueError) as e:
im.save(temp_file)
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:

View File

@ -676,7 +676,7 @@ WebPEncode_wrapper(PyObject *self, PyObject *args) {
char message[50] = "";
if (error_code == VP8_ENC_ERROR_BAD_DIMENSION) {
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);