#!/bin/sh
#
# Author:
#   Leif Kornstaedt <kornstae@ps.uni-sb.de>
#
# Copyright:
#   Leif Kornstaedt, 1998
#
# Last change:
#   $Date$ by $Author$
#   $Revision$
#
# This file is part of Mozart, an implementation of Oz 3:
#   $MOZARTURL$
#
# See the file "LICENSE" or
#   $LICENSEURL$
# for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL
# WARRANTIES.
#

if [ $# -ne 2 ]
then
    echo usage: `basename $0` \<input file\> \<output file\> 1>&2
    exit 2
fi

infile=$1
outfile=$2

case "$1" in
    *.gif) giftopnm $infile | pnmscale -ysize 50 | ppmquant 256 | pnmtopng > $outfile;;
    *.png) pngtopnm $infile | pnmscale -ysize 50 | ppmquant 256 | pnmtopng > $outfile;;
    *) echo "unsupported file type" >&2; exit 1;;
esac

