blob: 00c784004e1fa9c695a3c8e42ec30fd93074e87f (
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
35
36
37
|
#! /bin/bash
# This script tests: pamtowinicon ppmtowinicon winicontopam
# Also requires: pamchannel pamcut pamdepth pamtopam pngtopam pnmtile pnmtopng
tmpdir=${tmpdir:-/tmp}
test_pam=${tmpdir}/testimg.pam
echo "Test 1. Should print 4241318573 6973 four times"
pamcut --left=30 --width=48 --height=48 testimg.ppm | pamtopam | \
tee ${test_pam} | cksum
pamtowinicon ${test_pam} | winicontopam | \
pamchannel -tupletype="RGB" 0 1 2 | cksum
pamtowinicon -pngthreshold=300 ${test_pam} | winicontopam | \
pamchannel -tupletype="RGB" 0 1 2 | cksum
pamtowinicon -pngthreshold=1 ${test_pam} | winicontopam | \
pamchannel -tupletype="RGB" 0 1 2 | cksum
rm ${test_pam}
echo "Test 1. Should print 819454437 1093 six times"
pnmtile 32 32 testgrid.pbm | pamtopam | \
tee ${test_pam} | cksum
pamtowinicon ${test_pam} | winicontopam | \
pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
pamtowinicon -pngthreshold=300 ${test_pam} | winicontopam | \
pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
pamtowinicon -pngthreshold=1 ${test_pam} | winicontopam |
pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
pamtowinicon -pngthreshold=1 ${test_pam} | winicontopam |
pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
rm ${test_pam}
pnmtile 32 32 testgrid.pbm | ppmtowinicon | winicontopam | \
pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
|