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