blob: cdd53623a31193671e63fce2c24b71336826d2c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#! /bin/bash
# This script tests: pgmtoppm
# Also requires: pamseq pamtopnm pgmramp
alias pgmtoppm="${PBM_TESTPREFIX}pgmtoppm"
alias pamseq="${PBM_BINPREFIX}pamseq"
alias pamtopnm="${PBM_BINPREFIX}pamtopnm"
alias pgmramp="${PBM_BINPREFIX}pgmramp"
shopt -s expand_aliases
pgmramp -maxval=5 -lr 256 1 >${tmpdir}/test.pgm
pamseq 3 5 -tupletype=RGB | pamtopnm \
>${tmpdir}/palette
# Test 1.
pgmtoppm green ${tmpdir}/test.pgm | cksum
pgmtoppm yellow-blue ${tmpdir}/test.pgm | cksum
pgmtoppm -map=${tmpdir}/palette ${tmpdir}/test.pgm | cksum
rm ${tmpdir}/test.pgm ${tmpdir}/palette
|