I made a simple conversion method as following:
from PIL import Image
def convert(src, dst):
with Image.open(src) as img:
print(f'file opened = {src}')
if hasattr(img, 'is_animated') and img.is_animated:
print(f'frames = {img.n_frames}')
img.save(dst,
quality=90,
save_all=True)
else:
print('not animated')
img.save(dst, quality=90)
if __name__ == '__main__':
convert('src.gif','dst.webp')
I converted some .gif
images to animated webp, and there are noises on images.
Results:
What am I missing?
I am using Python 3.9.7 Pillow 8.3.2.
source1:
source2: