Fix: don't convert gif to jpg when using chafa

This commit is contained in:
Nikita Ivanov 2022-10-11 13:42:48 +05:00
parent 063369bed7
commit 99db6496ca
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -60,16 +60,8 @@ is_anim_image() {
esac
}
prepare_anim_img() {
if [ "$1" != "$cache_f" ] && is_anim_image "$1"; then
convert "${1}[0]" "jpg:${cache_f}" && printf '%s\n' "$cache_f"
else
printf '%s\n' "$1"
fi
}
chafa_run() {
_f="$(prepare_anim_img "$1")" && chafa -s "${w}x${h}" "$_f"
chafa -s "${w}x${h}" "$1"
}
setup_fifo() {