1
0
Fork 0
forked from josch/img2pdf

add information about how to convert images to 8 bit (closes: )

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-08-03 22:30:27 +02:00
parent 1e8557cef1
commit 3e832fbcc2
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1322,6 +1322,10 @@ def get_imgmetadata(
if depth > 8: if depth > 8:
logger.warning("Image with transparency and a bit depth of %d." % depth) logger.warning("Image with transparency and a bit depth of %d." % depth)
logger.warning("This is unsupported due to PIL limitations.") logger.warning("This is unsupported due to PIL limitations.")
logger.warning(
"If you accept a lossy conversion, you can manually convert "
"your images to 8 bit using `convert -depth 8` from imagemagick"
)
raise AlphaChannelError( raise AlphaChannelError(
"Refusing to work with multiple >8bit channels." "Refusing to work with multiple >8bit channels."
) )