diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-03-28 15:34:36 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-03-28 15:34:36 +0000 |
commit | ca561223546a7e8acd055d5b2114869dd88f5114 (patch) | |
tree | 79a54d551eac6df794c539d8b8924aab217a1941 /test/jpeg-roundtrip.test | |
parent | 8b32628b4c65cdd2b09e877150bbc4bcdd9b6ba7 (diff) | |
download | netpbm-mirror-ca561223546a7e8acd055d5b2114869dd88f5114.tar.gz netpbm-mirror-ca561223546a7e8acd055d5b2114869dd88f5114.tar.xz netpbm-mirror-ca561223546a7e8acd055d5b2114869dd88f5114.zip |
Copy Development as new Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2932 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/jpeg-roundtrip.test')
-rwxr-xr-x | test/jpeg-roundtrip.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/jpeg-roundtrip.test b/test/jpeg-roundtrip.test new file mode 100755 index 00000000..1afc5423 --- /dev/null +++ b/test/jpeg-roundtrip.test @@ -0,0 +1,21 @@ +#! /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 +# A small margin has been added to the above numbers. + +# Should print 3 1 1 1 three times + +pnmtojpeg testimg.ppm | jpegtopnm | \ + pnmpsnr -machine - testimg.ppm |\ + awk '{printf("%3d %1d %1d %1d\n",NF,$1>55.0,$2>57.0,$3>48.0)}' + +pnmtojpeg testimg.ppm -opt | jpegtopnm | \ + pnmpsnr -machine - testimg.ppm |\ + awk '{printf("%3d %1d %1d %1d\n",NF,$1>55.0,$2>57.0,$3>48.0)}' + +pnmtojpeg testimg.ppm -progressive | jpegtopnm | \ + pnmpsnr -machine - testimg.ppm |\ + awk '{printf("%3d %1d %1d %1d\n",NF,$1>55.0,$2>57.0,$3>48.0)}' \ No newline at end of file |