From 258fcf069cd998c556dd872997b4cefbf36ee70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ronan=20Paix=C3=A3o?= Date: Mon, 12 Aug 2019 01:26:36 -0300 Subject: [PATCH] Fix saving of ICC profile --- pdf_images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf_images.py b/pdf_images.py index 71dd058..f990a1d 100644 --- a/pdf_images.py +++ b/pdf_images.py @@ -157,7 +157,7 @@ def extract_images(page, filename_prefix="IMG_", start_index=0): img.save(img_fname) # Try to insert ICC profile - if color_space[0] == '/ICCBased': + if color_space == '/ICCBased': img = Image.open(img_fname) img.save(img_fname, icc_profile=components.getData())