about summary refs log tree commit diff
path: root/test/tiffcmyk-roundtrip.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-12-30 20:35:00 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-12-30 20:35:00 +0000
commit8c46a4c67e321801d99078a7fb22af6a20e4aa7b (patch)
treeba5d6e4eceb646d9892859b384f78d579a75bb66 /test/tiffcmyk-roundtrip.test
parenta24369691a810b5cb4f929618b080d82c8200938 (diff)
downloadnetpbm-mirror-8c46a4c67e321801d99078a7fb22af6a20e4aa7b.tar.gz
netpbm-mirror-8c46a4c67e321801d99078a7fb22af6a20e4aa7b.tar.xz
netpbm-mirror-8c46a4c67e321801d99078a7fb22af6a20e4aa7b.zip
Copy Development as new Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3104 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/tiffcmyk-roundtrip.test')
-rwxr-xr-xtest/tiffcmyk-roundtrip.test25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/tiffcmyk-roundtrip.test b/test/tiffcmyk-roundtrip.test
index e123d807..99e02c48 100755
--- a/test/tiffcmyk-roundtrip.test
+++ b/test/tiffcmyk-roundtrip.test
@@ -16,31 +16,46 @@ output_tiff=${tmpdir}/output.tiff
 pnmtotiffcmyk testimg.ppm > ${output_tiff} && \
   tifftopnm -headerdump -byrow ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 # Note that "-rowsperstrip=1" does not work
 pnmtotiffcmyk -rowsperstrip 1 -lsb2msb testimg.ppm > ${output_tiff} && \
   tifftopnm -respectfillorder -byrow  ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 pnmtotiffcmyk -packbits testimg.ppm > ${output_tiff} && \
   tifftopnm -byrow ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 pnmtotiffcmyk -lzw testimg.ppm > ${output_tiff} && \
   tifftopnm -byrow ${output_tiff} | \
     pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 pnmtotiffcmyk -lzw -predictor 2 testimg.ppm > ${output_tiff} && \
   tifftopnm -respectfillorder -byrow ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 rm ${output_tiff}
\ No newline at end of file