diff options
Diffstat (limited to 'test/pamditherbw-random.test')
-rwxr-xr-x | test/pamditherbw-random.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/pamditherbw-random.test b/test/pamditherbw-random.test new file mode 100755 index 00000000..5bff4bac --- /dev/null +++ b/test/pamditherbw-random.test @@ -0,0 +1,23 @@ +#! /bin/bash +# This script tests: pamditherbw +# Also requires: pamchannel pamtopnm + +tmpdir=${tmpdir:-/tmp} +test_red=${tmpdir}/testimg.red + +# Test 1. Floyd-Steinberg +echo "Test: Floyd-Steinberg" +echo "Should print 3849876047 33894" + +pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \ + tee ${test_red} | \ + pamditherbw -fs -randomseed=1 | cksum + + +# Test 2. Atkinson +echo "Test: Atkinson" +echo "Should print 2887295695 33894" + +pamditherbw -atkinson -randomseed=1 ${test_red} | cksum + +rm ${test_red} \ No newline at end of file |