From 9299ba8f331e0d63b03dacbd8441594c10adb5e1 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 30d514a..efc56c2 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]