mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Fix KeyError in Tests/test_file_xpm.py
This commit is contained in:
parent
13f3a40208
commit
b29326b175
|
@ -616,7 +616,13 @@ class Image:
|
|||
self.palette.mode = "RGB"
|
||||
self.palette.rawmode = None
|
||||
if "transparency" in self.info:
|
||||
if self.info["transparency_palette"]:
|
||||
|
||||
# XXX Not sure how this ever worked:
|
||||
# if self.info["transparency_palette"]:
|
||||
# Should probably be:
|
||||
if "transparency_palette" in self.info:
|
||||
# amirite?
|
||||
|
||||
self.im.putpalettealpha(0, 0, self.info["transparency_palette"])
|
||||
else:
|
||||
self.im.putpalettealpha(self.info["transparency"], 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user