about summary refs log tree commit diff
path: root/test/jpeg-roundtrip.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-06-28 23:45:11 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-06-28 23:45:11 +0000
commitcdf6e0151411d887fef61245cb303ef190b29335 (patch)
tree678c2212e125e66e0a868773e2b4ec460794da4e /test/jpeg-roundtrip.test
parentde1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff)
downloadnetpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz
netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz
netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/jpeg-roundtrip.test')
-rwxr-xr-xtest/jpeg-roundtrip.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/jpeg-roundtrip.test b/test/jpeg-roundtrip.test
new file mode 100755
index 00000000..7cc0fc20
--- /dev/null
+++ b/test/jpeg-roundtrip.test
@@ -0,0 +1,19 @@
+#! /bin/bash
+# This script tests: pnmtojpeg jpegtopnm
+# Also requires: pnmpsnr
+
+# TODO: threshold has been determined without much thought.
+# Observed pnmpsnr output: 56.20 58.26 49.38
+# On another system:       54.73 49.41 44.52
+# A small margin has been added to the above numbers.
+
+# Should print "match" three times
+
+pnmtojpeg testimg.ppm | jpegtopnm | \
+  pnmpsnr -target1=54 -target2=49 -target3=44 - testimg.ppm
+
+pnmtojpeg testimg.ppm -opt | jpegtopnm | \
+  pnmpsnr -target1=54 -target2=49 -target3=44 - testimg.ppm
+
+pnmtojpeg testimg.ppm -progressive | jpegtopnm | \
+  pnmpsnr -target1=54 -target2=49 -target3=44 - testimg.ppm