Skip to content

Commit 1c30809

Browse files
committed
Allow for LA or PA in the future
1 parent faa66ea commit 1c30809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PIL/Image.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ def has_transparency_data(self) -> bool:
15441544
"""
15451545
return (
15461546
self.mode in ("LA", "La", "PA", "RGBA", "RGBa")
1547-
or (self.mode == "P" and self.palette.mode == "RGBA")
1547+
or (self.mode == "P" and self.palette.mode.endswith("A"))
15481548
or "transparency" in self.info
15491549
)
15501550

0 commit comments

Comments
 (0)