about summary refs log tree commit diff
path: root/test/pnmquantall.test
blob: 7d9ddf82e20c88ff6049f76328877afc06176758 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/bash
# This script tests: pnmquantall
# Also requires: ppmtorgb3 pgmhist

ppmtorgb3 testimg.ppm

pnmquantall 20 testimg.red testimg.grn testimg.blu

for i in testimg.red testimg.grn testimg.blu
do
cksum $i
done

# Should print 1

pnmcat testimg.red testimg.grn testimg.blu -tb | \
    pgmhist -m | awk '$2>0 {s++}; END { print (s<=20) }'