info: adjust ICC warning message

This commit is contained in:
James R. Barlow
2022-05-26 00:21:31 -07:00
parent c311768452
commit e7a44ba87a
+5 -3
View File
@@ -37,8 +37,8 @@ from pikepdf import (
PdfImage,
PdfInlineImage,
PdfMatrix,
parse_content_stream,
UnsupportedImageTypeError,
parse_content_stream,
)
from ocrmypdf._concurrent import Executor, SerialExecutor
@@ -360,9 +360,11 @@ class ImageInfo:
else:
self._comp = 3
except UnsupportedImageTypeError as ex:
logger.warn('Unreadable image: {}. {}'.format(ex, self))
self._comp = None
logger.warn(
f"An image with a corrupt or unreadable ICC profile was found. "
f"The output PDF may not match the input PDF visually: {ex}. {self}"
)
else:
if isinstance(self._color, Colorspace):
self._comp = FRIENDLY_COMP.get(self._color)