mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Move to an elif clause of the if in line 778, as it's just another combination of mode,self.mode under the master transparency condition
This commit is contained in:
parent
a59bc40c38
commit
0938145e57
|
@ -802,7 +802,8 @@ class Image:
|
|||
# after quantization.
|
||||
trns_im = trns_im.convert('RGB')
|
||||
trns = trns_im.getpixel((0,0))
|
||||
|
||||
elif self.mode == 'P' and mode == 'RGBA' and 'transparency' in self.info:
|
||||
delete_trns = True
|
||||
|
||||
if mode == "P" and palette == ADAPTIVE:
|
||||
im = self.im.quantize(colors)
|
||||
|
@ -837,9 +838,6 @@ 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