mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Convert unsupported WebP mode to RGB as .convert supports more src modes
This commit is contained in:
parent
0704367952
commit
f3edf52900
|
@ -246,7 +246,7 @@ def _save_all(im, fp, filename):
|
|||
if ims.mode not in _VALID_WEBP_MODES:
|
||||
alpha = 'A' in ims.mode or 'a' in ims.mode \
|
||||
or (ims.mode == 'P' and 'A' in ims.im.getpalettemode())
|
||||
rawmode = 'RGBA' if alpha else 'RGBX'
|
||||
rawmode = 'RGBA' if alpha else 'RGB'
|
||||
frame = ims.convert(rawmode)
|
||||
|
||||
if rawmode == 'RGB':
|
||||
|
|
Loading…
Reference in New Issue
Block a user