mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-07 13:54:45 +03:00
Validate self.palette in has_transparency_data()
This commit is contained in:
parent
50e9a92c98
commit
92e57889d0
|
@ -1561,7 +1561,7 @@ class Image:
|
|||
"""
|
||||
return (
|
||||
self.mode in ("LA", "La", "PA", "RGBA", "RGBa")
|
||||
or (self.mode == "P" and self.palette.mode.endswith("A"))
|
||||
or (self.mode == "P" and self.palette and self.palette.mode.endswith("A"))
|
||||
or "transparency" in self.info
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user