about summary refs log tree commit diff
path: root/test/pamditherbw.test
blob: 5335f12d272971bd90eeefea74946d1e916853da (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
#! /bin/bash
# This script tests: pamditherbw
# Also requires: ppmtopgm

# Make test input
${PBM_BINPREFIX}ppmtopgm testimg.ppm >${tmpdir}/testimg.pgm

# Test 1.  Simple threshold
${PBM_TESTPREFIX}pamditherbw -threshold -val=0.5 \
   ${tmpdir}/testimg.pgm | cksum

# Test 2.  Floyd-Steinberg
#${PBM_TESTPREFIX}pamditherbw -floyd -val=0.5 ${tmpdir}/testimg.pgm | cksum

# Test 3. Atkinson
#${PBM_TESTPREFIX}pamditherbw -atkinson -val=0.5 ${tmpdir}/testimg.pgm | cksum

# Test 4. Hilbert
${PBM_TESTPREFIX}pamditherbw -hilbert ${tmpdir}/testimg.pgm | cksum

# Test 5. Dither-8
${PBM_TESTPREFIX}pamditherbw -dither8 ${tmpdir}/testimg.pgm | cksum

# Test 6. Cluster4
${PBM_TESTPREFIX}pamditherbw -cluster4 ${tmpdir}/testimg.pgm | cksum

# Test 7. Atkinson
#${PBM_TESTPREFIX}pamditherbw -atkinson -val=0.5 ${tmpdir}/testimg.pgm | cksum

# Remove test file
rm ${tmpdir}/testimg.pgm