about summary refs log tree commit diff
path: root/test/pnmremap1.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/pnmremap1.test')
-rwxr-xr-xtest/pnmremap1.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/pnmremap1.test b/test/pnmremap1.test
new file mode 100755
index 00000000..1e68c8ad
--- /dev/null
+++ b/test/pnmremap1.test
@@ -0,0 +1,19 @@
+#! /bin/bash
+# This script tests: pnmremap
+# Also requires: pamdepth pamseq pamtopnm
+
+${PBM_BINPREFIX}pamseq 3 5 -tupletype=RGB | ${PBM_BINPREFIX}pamtopnm \
+ > ${tmpdir}/palette
+${PBM_BINPREFIX}pamdepth 255 ${tmpdir}/palette > ${tmpdir}/palette255
+
+# Test 1. Floyd-Steinberg
+# This fails with older versions of Netpbm and x86-64.
+# May also fail on other non-Intel architectures.
+# v. 10.59.2
+# x86-32: 2667816854 101482 
+# x86-64: 3602410851 101482
+
+${PBM_TESTPREFIX}pnmremap -mapfile=${tmpdir}/palette -floyd -norandom \
+ testimg.ppm | cksum
+
+rm ${tmpdir}/palette{,255}