Skip to content

Commit

Permalink
Fix saving of ICC profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanpaixao committed Aug 12, 2019
1 parent 7819380 commit 258fcf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down

0 comments on commit 258fcf0

Please sign in to comment.