mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Improved error message for missing packer
It's not that the raw mode does not exist. There is just no direct conversion.
This commit is contained in:
parent
2ecbcce415
commit
124e42ade3
2
encode.c
2
encode.c
|
@ -365,7 +365,7 @@ get_packer(ImagingEncoderObject* encoder, const char* mode,
|
||||||
pack = ImagingFindPacker(mode, rawmode, &bits);
|
pack = ImagingFindPacker(mode, rawmode, &bits);
|
||||||
if (!pack) {
|
if (!pack) {
|
||||||
Py_DECREF(encoder);
|
Py_DECREF(encoder);
|
||||||
PyErr_SetString(PyExc_SystemError, "unknown raw mode");
|
PyErr_Format(PyExc_ValueError, "No packer found from %s to %s", mode, rawmode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user