#!/bin/sh

LOGO_WIDTH=64
LOGO_HEIGHT=48
LOGO_DEPTH=16

for INPUT in `find -maxdepth 1 -name "*.jpg"` ; do
    echo -n "Processing $INPUT:  "
    OUTPUT=`echo $INPUT | sed 's/^\(.*\)\(\.[^.]*\)$/\1/'`
    OUTPUT="$OUTPUT.xpm"
    BATCHCMD="gimp -i -d -b '(script_fu_tovdr $LOGO_WIDTH $LOGO_HEIGHT $LOGO_DEPTH  \"$INPUT\" \"$OUTPUT\")' '(gimp-quit 0)'"
    eval $BATCHCMD
done