forked from josch/img2pdf
Compare commits
2 commits
8839129d6b
...
e2aa5e5aca
Author | SHA1 | Date | |
---|---|---|---|
e2aa5e5aca | |||
3d7e0e6812 |
1 changed files with 3 additions and 1 deletions
|
@ -826,7 +826,9 @@ class pdfdoc(object):
|
|||
elif color == Colorspace.CMYK or color == Colorspace["CMYK;I"]:
|
||||
iccpdict[PdfName.N] = 4
|
||||
elif color == Colorspace.P:
|
||||
raise Exception("Cannot have Palette images with ICC profile")
|
||||
# Only the png format can have an icc profile as well as a
|
||||
# color palette. A png palette is always RGB.
|
||||
iccpdict[PdfName.N] = 3
|
||||
colorspace = [PdfName.ICCBased, iccpdict]
|
||||
|
||||
# either embed the whole jpeg or deflate the bitmap representation
|
||||
|
|
Loading…
Reference in a new issue