mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 18:23:24 +03:00
Possible fix for #664
This commit is contained in:
parent
55b1accb42
commit
ca7608f1d5
|
@ -837,6 +837,9 @@ class Image:
|
|||
except KeyError:
|
||||
raise ValueError("illegal conversion")
|
||||
|
||||
if self.mode == 'P' and mode == 'RGBA' and 'transparency' in self.info:
|
||||
delete_trns = True
|
||||
|
||||
new_im = self._new(im)
|
||||
if delete_trns:
|
||||
#crash fail if we leave a bytes transparency in an rgb/l mode.
|
||||
|
|
Loading…
Reference in New Issue
Block a user