mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-25 08:10:33 +03:00
Merge pull request #6798 from radarhere/apply_transparency
This commit is contained in:
commit
1a93e84355
|
@ -1531,7 +1531,8 @@ class Image:
|
||||||
def apply_transparency(self):
|
def apply_transparency(self):
|
||||||
"""
|
"""
|
||||||
If a P mode image has a "transparency" key in the info dictionary,
|
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:
|
if self.mode != "P" or "transparency" not in self.info:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user