diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-03-31 15:43:19 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-03-31 15:43:19 +0800 |
commit | f184a16e87f498f4cd213d93dd6ea5cad2b77173 (patch) | |
tree | 6e18c368fda2d4c08581f26998c3a46e41770260 | |
parent | 43d8a4a3bff388d727667e8415dcc637acf7b09b (diff) | |
download | atoolbox-f184a16e87f498f4cd213d93dd6ea5cad2b77173.tar.bz2 |
add img/png2gif.sh: make animated GIF
-rw-r--r-- | img/png2gif.sh | 11 |
1 files changed, 11 insertions, 0 deletions
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 + |