Possible fix for #664

This commit is contained in:
hugovk 2014-05-17 20:36:17 +03:00
parent 55b1accb42
commit ca7608f1d5

View File

@ -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.