From f184a16e87f498f4cd213d93dd6ea5cad2b77173 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 31 Mar 2016 15:43:19 +0800 Subject: add img/png2gif.sh: make animated GIF --- img/png2gif.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 img/png2gif.sh diff --git a/img/png2gif.sh b/img/png2gif.sh new file mode 100644 index 0000000..1357be3 --- /dev/null +++ b/img/png2gif.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +#convert ???.png -background white -alpha remove -resize 50% -layers optimize -delay 5 -loop 0 simu.gif + +[ ! -d gifs ] && mkdir gifs + +for f in ???.png; do + convert $f -trim -resize 50% gifs/${f%.png}.gif +done +gifsicle --delay=5 --loop --colors=256 --optimize=3 gifs/???.gif > simu.gif + -- cgit v1.2.2