#!/bin/sh # # Copyright (c) 2001 by ISHIKAWA, Hidenori # # This script may be used, modified, copied or distributed in both # source and binary as long as the above copyright and these terms # are retained. # # Although the author has debugged this patch with great care, # under no circumstances is the author responsible for any damage # incurred with its use. # # July, 2001 Tested on OpenBSD 2.9-current # error() { echo 'usage: ppmgradation [from coluor] [to colour]' exit 255 } if [ x"$1" == "x" -o x"$2" == "x" -o x"$3" == "x" -o x"$4" == "x" ]; then error fi pgmramp -tb ${1} ${2} | pgmtoppm ${3}-${4}