summaryrefslogtreecommitdiff
path: root/app/tools/mkimage1
diff options
context:
space:
mode:
Diffstat (limited to 'app/tools/mkimage1')
-rwxr-xr-xapp/tools/mkimage124
1 files changed, 24 insertions, 0 deletions
diff --git a/app/tools/mkimage1 b/app/tools/mkimage1
new file mode 100755
index 0000000..fef13f6
--- /dev/null
+++ b/app/tools/mkimage1
@@ -0,0 +1,24 @@
+#!/bin/bash
+if [ $# -lt 2 ] ; then
+ echo mkimage1 OUTDIR PNG ...
+ echo Converts .pmg files to .image1
+ echo Run from SRCDIR/app/bitmaps
+ echo
+ echo '$ cd $SRCDIR/app/bin/bitmaps'
+ echo '$ ../../tools/mkimage1 $BLDDIR/app/bin/bitamps *.png'
+ exit 1
+fi
+
+OUTDIR=$1
+if [ ! -d ${OUTDIR} ] ; then
+ echo ${OUTDIR} - not a directory
+ exit 1
+fi
+
+shift
+for PNGFILE in "$@" ; do
+ NAME=`basename "$PNGFILE" | sed 's/.png//'`;
+ gdk-pixbuf-csource --stream --name "${NAME}_image1" ${PNGFILE} \
+ | sed -e 's/guint8/char/g' \
+ > ${OUTDIR}/${NAME}.image1
+done