blob: fef71efa764cbc6608bcc986eef81b9d9b03be41 (
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
|
#! /bin/bash
# This script tests: pamditherbw
# Also requires: ppmtopgm
alias pamditherbw="${PBM_TESTPREFIX}pamditherbw"
alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm"
shopt -s expand_aliases
# Make test input
ppmtopgm testimg.ppm >${tmpdir}/testimg.pgm
# Test 1. Simple threshold
pamditherbw -threshold -val=0.5 \
${tmpdir}/testimg.pgm | cksum
# Test 2. Floyd-Steinberg
#pamditherbw -floyd -val=0.5 ${tmpdir}/testimg.pgm | cksum
# Test 3. Atkinson
#pamditherbw -atkinson -val=0.5 ${tmpdir}/testimg.pgm | cksum
# Test 4. Hilbert
pamditherbw -hilbert ${tmpdir}/testimg.pgm | cksum
# Test 5. Dither-8
pamditherbw -dither8 ${tmpdir}/testimg.pgm | cksum
# Test 6. Cluster4
pamditherbw -cluster4 ${tmpdir}/testimg.pgm | cksum
# Test 7. Atkinson
#pamditherbw -atkinson -val=0.5 ${tmpdir}/testimg.pgm | cksum
# Remove test file
rm ${tmpdir}/testimg.pgm
|