about summary refs log tree commit diff
path: root/test/pamditherbw.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/pamditherbw.test')
-rwxr-xr-xtest/pamditherbw.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/pamditherbw.test b/test/pamditherbw.test
new file mode 100755
index 00000000..3f377f81
--- /dev/null
+++ b/test/pamditherbw.test
@@ -0,0 +1,32 @@
+#! /bin/bash
+# This script tests: pamditherbw
+# Also requires: pamchannel pamtopnm
+
+
+tmpdir=${tmpdir:-/tmp}
+test_red=${tmpdir}/testimg.red
+
+# Test 1.  Simple threshold
+pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \
+  tee ${test_red} | \
+  pamditherbw -threshold -val=0.5 | cksum
+
+# Test 2.  Floyd-Steinberg
+#pamditherbw -floyd -val=0.5 ${test_red} | cksum
+
+# Test 3. Atkinson
+#pamditherbw -atkinson -val=0.5 ${test_red} | cksum
+
+# Test 4. Hilbert
+pamditherbw -hilbert ${test_red} | cksum
+
+# Test 5. Dither-8
+pamditherbw -dither8 ${test_red} | cksum
+
+# Test 6. Cluster4
+pamditherbw -cluster4 ${test_red} | cksum
+
+# Test 7. Atkinson
+#pamditherbw -atkinson -val=0.5 ${test_red} | cksum
+
+rm ${test_red}