src/img2pdf.py: also reject palette images with transparency
This commit is contained in:
parent
ba5a9a1dfc
commit
53685934f9
1 changed files with 1 additions and 1 deletions
|
@ -684,7 +684,7 @@ def get_imgmetadata(imgdata, imgformat, default_dpi, colorspace, rawdata=None):
|
||||||
ndpi = (int(round(ndpi[0])), int(round(ndpi[1])))
|
ndpi = (int(round(ndpi[0])), int(round(ndpi[1])))
|
||||||
ics = imgdata.mode
|
ics = imgdata.mode
|
||||||
|
|
||||||
if ics in ["LA", "PA", "RGBA"]:
|
if ics in ["LA", "PA", "RGBA"] or "transparency" in imgdata.info:
|
||||||
logging.warning("Image contains transparency which cannot be retained "
|
logging.warning("Image contains transparency which cannot be retained "
|
||||||
"in PDF.")
|
"in PDF.")
|
||||||
logging.warning("img2pdf will not perform a lossy operation.")
|
logging.warning("img2pdf will not perform a lossy operation.")
|
||||||
|
|
Loading…
Reference in a new issue