Posted as a comment in this stackexchange question
https://unix.stackexchange.com/questions/419761/webp-animation-to-gif-animation-cli
Usage:
- Make sure python3 is installed.
- Install
Pillow
package
python3 -m pip install --upgrade Pillow
- Download this script and run it as
python_pillow_webp2gif.py {{animated_image}}.webp
- Use gif output produced by name
{{animated_image}}.gif
I suggest replacing line 13 (im2.paste(frame, mask=frame.split()[3])) with these 3 lines:
If the .webp contains only R, G, B and no A (opacity) bands, there are only 3 bands, so 'frame.split()[3]' causes an exception.
Thanks for the example.