-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
What did you do?
Converted some animated gifs to animated webp. Used different qualtity settings.
What did you expect to happen?
Getting a identical converted image. Beside the(logical) format and possible size change.
What actually happened?
Webp outputs are defect. Three different problems appear.
The output images:
- play too slow
- do not play in a image viewer (gwenview for me OR in Pillow's Image.show() method)
- some images have after convert also visual defects like wrong pixels (flickering and line style artifacts)
ps.: Converting the same images with the same settings with webp CLI tools works without issues.
What are your OS, Python and Pillow versions?
- OS: Kubuntu 18.04.3
- Python: 3.6.9
- Pillow: 6.2.1
Code example
Python:
from pathlib import Path as pt
from PIL import Image
src_f = pt("animated.gif")
dst_f = pt(src_f).with_suffix('.webp')
# other used quality settings for fast copy past:
# {'lossless': True} {'allow_mixed': True}
quali = {'quality': 90}
Image.open(src_f).save(dst_f, 'webp', **quali, save_all=True)Shell variant:
gif2webp -v -lossy -q 90 paris_metro.gif -o paris_metro.webpExample images
Content of the archive:
- Two input gifs
- both output files (converted with "quality 90") with problems 1. and 2.
- paris_metro.webp has also problem 3. present. (pixel errors are to see while playing)
anim.tar.gz