Permalink
Browse files

Add a script to generate sprites of the goban images.

  • Loading branch information...
1 parent 225f84f commit 52de4c35ae829e2d72f789c992d1f0f62bc050f3 @nicoolas25 committed Apr 5, 2012
Showing with 31 additions and 0 deletions.
  1. +31 −0 source/images/gobans/create-sprite.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# create-sprites.sh original 304x437 15x10
+#
+
+cd $1
+
+mkdir sprites
+
+for D in *; do
+ if [ -d "${D}" ]
+ then
+ cp ${D}/*.jpg ./sprites/
+ fi
+done
+
+mkdir sprites/gosu
+mkdir sprites/kamakor
+
+for I in ./sprites/*.jpg; do
+ if [ "$I" \< "./sprites/076.jpg" ]
+ then
+ mv "${I}" ./sprites/gosu/
+ else
+ mv "${I}" ./sprites/kamakor/
+ fi
+done
+
+#echo "montage -resize $1! -geometry $1 -tile $2 ./sprites/*.jpg all.jpg"
+montage -quality 70 -resize $2! -geometry $2 -tile $3 ./sprites/gosu/*.jpg gosu.jpg
+montage -quality 70 -resize $2! -geometry $2 -tile $3 ./sprites/kamakor/*.jpg kamakor.jpg

0 comments on commit 52de4c3

Please sign in to comment.