Skip to content

Commit

Permalink
Clarify apply_transparency() docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 11, 2022
1 parent 0d6440d commit f6f622d
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 @@ -1482,7 +1482,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 f6f622d

Please sign in to comment.