force saving animation as gif to avoid a crash by PIL

This commit is contained in:
Lionel Dricot 2022-03-18 13:25:26 +01:00
parent 51c2bd966e
commit ea31d72b9e
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
- HTML: links in titles were previously missed
- Fixed crash when chafa is not installed (Thanks Xavier Hinault for the report)
- Fixed crash when python-readability not installed (Thanks Nic for the report)
- Fixed some gif not being displayed
- Fixed some URL being wronlgy interpreted as IPv6
## 1.0 - March 14th 2022

View File

@ -140,7 +140,7 @@ def inline_image(img_file,width):
img_obj = Image.open(img_file)
if hasattr(img_obj,"n_frames") and img_obj.n_frames > 1:
# we remove all frames but the first one
img_obj.save(img_file,save_all=False)
img_obj.save(img_file,format="gif",save_all=False)
inline = "chafa --bg white -s %s -w 1 -f symbols"
elif _NEW_CHAFA:
inline = "chafa --bg white -s %s -w 1 -f symbols --animate=off"