From d1cb958745e00f4f790bcacdf0a420cb227a5a88 Mon Sep 17 00:00:00 2001 From: Neo_Chen Date: Sun, 15 Mar 2020 20:07:09 +0800 Subject: [PATCH] makegraph.sh: use optipng to reduce nodes.png's size --- makegraph.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/makegraph.sh b/makegraph.sh index 66c091d..943cda8 100755 --- a/makegraph.sh +++ b/makegraph.sh @@ -7,3 +7,11 @@ if which dot 2>&1 > /dev/null ; then else echo 'You need to install graphviz first' fi + +if [ "$1" != 'noopt' ]; then + if which optipng 2>&1 > /dev/null ; then + optipng -o7 -zm9 -v nodes.png + else + echo 'optipng is not present, not optimizing compression' + fi +fi