about summary refs log tree commit diff
path: root/test/gif-quant-roundtrip.test
blob: 910fa3694dea80eb47ea5a081457c1cad9ffe70f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /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 ${PIPESTATUS[@]} ":" $?

rm ${quant_ppm}