Skip to content

Commit

Permalink
Allow for LA or PA in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 26, 2023
1 parent faa66ea commit 1c30809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ def has_transparency_data(self) -> bool:
"""
return (
self.mode in ("LA", "La", "PA", "RGBA", "RGBa")
or (self.mode == "P" and self.palette.mode == "RGBA")
or (self.mode == "P" and self.palette.mode.endswith("A"))
or "transparency" in self.info
)

Expand Down

0 comments on commit 1c30809

Please sign in to comment.