Skip to content

Commit

Permalink
Merge pull request #6798 from radarhere/apply_transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 28, 2022
2 parents d972890 + f6f622d commit 1a93e84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,8 @@ def getpalette(self, rawmode="RGB"):
def apply_transparency(self):
"""
If a P mode image has a "transparency" key in the info dictionary,
remove the key and apply the transparency to the palette instead.
remove the key and instead apply the transparency to the palette.
Otherwise, the image is unchanged.
"""
if self.mode != "P" or "transparency" not in self.info:
return
Expand Down

0 comments on commit 1a93e84

Please sign in to comment.