mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +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