From 3e832fbcc236a3599349bb9dd278dd316ac946e3 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Thu, 3 Aug 2023 22:30:27 +0200 Subject: [PATCH] add information about how to convert images to 8 bit (closes: #170) --- src/img2pdf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/img2pdf.py b/src/img2pdf.py index 54701c9..06f2e7b 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -1322,6 +1322,10 @@ def get_imgmetadata( if depth > 8: logger.warning("Image with transparency and a bit depth of %d." % depth) 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( "Refusing to work with multiple >8bit channels." )