mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
fixed check for str with Python 3
This commit is contained in:
parent
1401adaefa
commit
2d478fe82a
|
@ -628,10 +628,10 @@ class Image:
|
|||
self.palette.mode = "RGB"
|
||||
self.palette.rawmode = None
|
||||
if "transparency" in self.info:
|
||||
if isinstance(self.info["transparency"], str):
|
||||
self.im.putpalettealphas(self.info["transparency"])
|
||||
else:
|
||||
if isinstance(self.info["transparency"], int):
|
||||
self.im.putpalettealpha(self.info["transparency"], 0)
|
||||
else:
|
||||
self.im.putpalettealphas(self.info["transparency"])
|
||||
self.palette.mode = "RGBA"
|
||||
|
||||
if self.im:
|
||||
|
|
Loading…
Reference in New Issue
Block a user