diff --git a/src/img2pdf.py b/src/img2pdf.py index c70963a..4fbfa19 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -638,10 +638,10 @@ def get_imgmetadata(imgdata, imgformat, default_dpi, colorspace, rawdata=None): ics = imgdata.mode if ics in ["LA", "PA", "RGBA"]: - logging.warn("Image contains transparency which cannot be retained in PDF.") - logging.warn("img2pdf will not perform a lossy operation.") - logging.warn("You can remove the alpha channel using imagemagick:") - logging.warn(" $ convert input.png -background white -alpha remove -alpha off output.png") + logging.warning("Image contains transparency which cannot be retained in PDF.") + logging.warning("img2pdf will not perform a lossy operation.") + logging.warning("You can remove the alpha channel using imagemagick:") + logging.warning(" $ convert input.png -background white -alpha remove -alpha off output.png") raise Exception("Refusing to work on images with alpha channel")