blob: 54b52c60b7e49e9ea515563556df12ad8e9116ad (
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
25
26
27
28
29
30
31
32
33
34
|
#! /bin/bash
# This script tests: pamenlarge pbmpscale pbmreduce
# Also requires: pbmtext
tmpdir=${tmpdir:-/tmp}
xanadu_pbm=${tmpdir}/xanadu.pbm
echo "In Xanadu did Kubla khan" | pbmtext > ${xanadu_pbm}
# Should print 2364818683 590
cat ${xanadu_pbm} | cksum
# Should print 2364818683 590 eight times
for scale in 2 4 6 7
do
for flag in "-fs -randomseed=0" "-threshold -v 0.4"
do
pamenlarge ${scale} ${xanadu_pbm} | pbmreduce ${flag} ${scale} | cksum
done
done
# Should print 2364818683 590 eight times
for scale in 5 7 9 11
do
for flag in "-fs -randomseed=0" "-threshold"
do
pbmpscale ${scale} ${xanadu_pbm} | pbmreduce ${flag} ${scale} | cksum
done
done
rm ${xanadu_pbm}
|