summaryrefslogtreecommitdiff
path: root/app/tools/mkimage1
blob: fef13f6035ad2685e4afa833dd67d202a9b3f14e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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