Skip to content

Commit

Permalink
Correct PDF palette size when saving
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 16, 2023
1 parent da0b826 commit 98b7300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/PdfImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98b7300

Please sign in to comment.