diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2008-01-17 13:02:45 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2008-01-17 13:02:45 +0000 |
commit | a96a64e4975b8e3100904f902bd3b24f521210fb (patch) | |
tree | 527dc300ac7bd41c00a429efbda53511d9b00109 /packages/supertux/files/img-resize.sh | |
parent | d6ab8cb7bb36e7876efeb274dd1aad1d3b1f6f3b (diff) |
supertux-qvga 0.1.3: Add QVGA port of SperTux, based on GP2X port.
* Original GP2X port by Ingo Arndt.
* Data conversion preparation and script by myself.
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 |