From cfbb40b0f635c44becce49260bc1680d6b45a67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Zahola?= Date: Sat, 19 Jun 2021 18:49:21 +0200 Subject: [PATCH] Always initialize `smask` --- src/img2pdf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/img2pdf.py b/src/img2pdf.py index 00be692..1dc01c4 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -858,6 +858,8 @@ class pdfdoc(object): image[PdfName.ColorSpace] = colorspace image[PdfName.BitsPerComponent] = depth + smask = None + if color == Colorspace["CMYK;I"]: # Inverts all four channels image[PdfName.Decode] = [1, 0, 1, 0, 1, 0, 1, 0]