summaryrefslogtreecommitdiff
path: root/packages/supertux/files/img-resize.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packages/supertux/files/img-resize.sh')
-rw-r--r--packages/supertux/files/img-resize.sh28
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