Skip to content

Commit

Permalink
Merge pull request python-pillow#7317 from radarhere/pdf_alpha
Browse files Browse the repository at this point in the history
Set SMaskInData to 1 for LA PDFs
  • Loading branch information
radarhere authored Aug 4, 2023
2 parents 95257df + c5b4ad9 commit fc99a58
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 @@ -162,8 +162,8 @@ def _save(im, fp, filename, save_all=False):
elif im.mode == "LA":
filter = "JPXDecode"
# params = f"<< /Predictor 15 /Columns {width-2} >>"
colorspace = PdfParser.PdfName("DeviceGray")
procset = "ImageB" # grayscale
dict_obj["SMaskInData"] = 1
elif im.mode == "P":
filter = "ASCIIHexDecode"
palette = im.getpalette()
Expand Down

0 comments on commit fc99a58

Please sign in to comment.