From a1932f1cb294464a487fd826a838410a803c3883 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 2 May 2013 08:14:49 +0200 Subject: [PATCH] force colorspace for non jpeg200 too --- img2pdf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/img2pdf.py b/img2pdf.py index d21ca1f..3c19d89 100644 --- a/img2pdf.py +++ b/img2pdf.py @@ -103,7 +103,10 @@ def main(images, dpi, title=None, author=None, creator=None, producer=None, else: dpi_x, dpi_y = imgdata.info.get("dpi", (96, 96)) imgformat = imgdata.format - color = imgdata.mode + if colorspace: + color = colorspace + else: + color = imgdata.mode if color == 'L': color = "/DeviceGray"