about summary refs log tree commit diff
path: root/test/gif-quant-roundtrip.test
blob: b5f69eddb7bf17be58b27a3dd4e61c770a00f0b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash
# This script tests: giftopnm pamtogif pnmquant
# Also requires: pnmcolormap pnmremap

  alias giftopnm="${PBM_TESTPREFIX}giftopnm"
  alias pamtogif="${PBM_TESTPREFIX}pamtogif"
  alias pnmquant="${PBM_TESTPREFIX}pnmquant"
  shopt -s expand_aliases

# Should print 0

colors=15      # any value between 2 - 256 works

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

rm ${tmpdir}/quant.ppm