force saving animation as gif to avoid a crash by PIL
This commit is contained in:
parent
51c2bd966e
commit
ea31d72b9e
|
@ -11,6 +11,7 @@
|
||||||
- HTML: links in titles were previously missed
|
- HTML: links in titles were previously missed
|
||||||
- Fixed crash when chafa is not installed (Thanks Xavier Hinault for the report)
|
- 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 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
|
- Fixed some URL being wronlgy interpreted as IPv6
|
||||||
|
|
||||||
## 1.0 - March 14th 2022
|
## 1.0 - March 14th 2022
|
||||||
|
|
|
@ -140,7 +140,7 @@ def inline_image(img_file,width):
|
||||||
img_obj = Image.open(img_file)
|
img_obj = Image.open(img_file)
|
||||||
if hasattr(img_obj,"n_frames") and img_obj.n_frames > 1:
|
if hasattr(img_obj,"n_frames") and img_obj.n_frames > 1:
|
||||||
# we remove all frames but the first one
|
# 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"
|
inline = "chafa --bg white -s %s -w 1 -f symbols"
|
||||||
elif _NEW_CHAFA:
|
elif _NEW_CHAFA:
|
||||||
inline = "chafa --bg white -s %s -w 1 -f symbols --animate=off"
|
inline = "chafa --bg white -s %s -w 1 -f symbols --animate=off"
|
||||||
|
|
Loading…
Reference in New Issue