about summary refs log tree commit diff
path: root/test/pnmquantall.test
blob: f0f18ab0fd6ab9418e3af79ee6174f2ede213cae (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 }'