From 6516339ae31259bfd67552d5ce97473b6bf498ee 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 2a7a5b7..9f9cba7 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]