You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to #627, we need to convert input images of the following color spaces to plain RGB at the beginning:
CMYK
HSV
YCbCr
LAB
I'm sure there are even more modes which Pillow does not support (see here), but let's concentrate on the modes which the PNG plugin does not support: Compare this list of Image modes with that list of PNG modes.
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/build/core/ocrd/ocrd/processor/helpers.py", line 101, in run_api
processor.process()
File "/build/ocrd_segment/ocrd_segment/replace_original.py", line 78, in process
mimetype='image/png')
File "/build/core/ocrd/ocrd/workspace.py", line 820, in save_image_file
image.save(image_bytes, format=MIME_TO_PIL[mimetype])
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2151, in save
save_handler(self, fp, filename)
File "/usr/local/lib/python3.6/dist-
packages/PIL/PngImagePlugin.py", line 1222, in _save
raise OSError(f"cannot write mode {mode} as PNG") from e
OSError: cannot write mode CMYK as PNG Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/PIL/PngImagePlugin.py", line 1220, in _save
rawmode, mode = _OUTMODES[mode]
KeyError: 'CMYK'
In addition to #627, we need to convert input images of the following color spaces to plain RGB at the beginning:
I'm sure there are even more modes which Pillow does not support (see here), but let's concentrate on the modes which the PNG plugin does not support: Compare this list of Image modes with that list of PNG modes.
The text was updated successfully, but these errors were encountered: