Skip to content

Commit

Permalink
Merge pull request #7555 from radarhere/pdf_palette
Browse files Browse the repository at this point in the history
Correct PDF palette size when saving
  • Loading branch information
radarhere authored Dec 4, 2023
2 parents 80d0ed4 + 98b7300 commit b431e2c
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 b431e2c

Please sign in to comment.