Correct PDF palette size when saving

This commit is contained in:
Andrew Murray 2023-11-16 23:01:26 +11:00
parent da0b826e96
commit 98b73009cc

View File

@ -96,7 +96,7 @@ def _write_image(im, filename, existing_pdf, image_refs):
dict_obj["ColorSpace"] = [
PdfParser.PdfName("Indexed"),
PdfParser.PdfName("DeviceRGB"),
255,
len(palette) // 3 - 1,
PdfParser.PdfBinary(palette),
]
procset = "ImageI" # indexed color