Blob Blame History Raw
#! /bin/bash
# This script tests: giftopnm pamtogif pnmquant
# Also requires:


# Should print 0

colors=15      # any value between 2 - 256 works

tmpdir=${tmpdir:-/tmp}
quant_ppm=${tmpdir}/quant.ppm

pnmquant ${colors} testimg.ppm > ${quant_ppm} &&
pamtogif ${quant_ppm} | giftopnm | \
   cmp -s - ${quant_ppm} > /dev/null
echo $?

rm ${quant_ppm}