diff options
author | Florian Boor <florian.boor@kernelconcepts.de> | 2008-01-21 21:09:09 +0000 |
---|---|---|
committer | Florian Boor <florian.boor@kernelconcepts.de> | 2008-01-21 21:09:09 +0000 |
commit | afd58cdcce656ced784bfca78d7d96e2edca8cee (patch) | |
tree | b49291fedc042760b35f74afa9b7e82b591147e5 /packages/supertux/files/img-resize.sh | |
parent | ac6de0f3c0d8d5fe5708d9125c1319fbf5d627a6 (diff) | |
parent | a7a4c7d6f9bbcda53d3bf07d51142d41e1a4558b (diff) |
merge of '1cc9d40e03f431fac4150580f6a58521cae55509'
and 'a250ef0b1707ead866fe051ca88c56e538d51bfb'
Diffstat (limited to 'packages/supertux/files/img-resize.sh')
-rw-r--r-- | packages/supertux/files/img-resize.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/supertux/files/img-resize.sh b/packages/supertux/files/img-resize.sh new file mode 100644 index 0000000000..0197964193 --- /dev/null +++ b/packages/supertux/files/img-resize.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +conv() { + +if [ ! -d org ]; then + mkdir org + mv *.jpg *.png org/ +fi + +for i in org/*; do + b=`basename $i` + ext=`expr "x$b" : 'x.*\.\(.*\)'` + if [ "$ext" == "png" ]; then + if [ $b == "tux-life.png" ]; then + cp $i _.png + else + convert $i -resize 50% -colors 64 _.png + fi + pngcrush -q _.png $b + elif [ "$ext" == "jpg" ]; then + convert $i -resize 50% -quality 60 $b + fi +done +rm _.png + +} + +conv |