diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-10-19 01:51:17 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-10-19 01:51:17 +0000 |
commit | f9c37d448dcffe75585b75ef36980e3a170edc4c (patch) | |
tree | 4265bb0665ac41d3f463c0bf0805eb79ca55fe2a /test/tiffcmyk-roundtrip.test | |
parent | 54a249d24811a5841b853f9a88a0c5c9871133e3 (diff) | |
download | netpbm-mirror-f9c37d448dcffe75585b75ef36980e3a170edc4c.tar.gz netpbm-mirror-f9c37d448dcffe75585b75ef36980e3a170edc4c.tar.xz netpbm-mirror-f9c37d448dcffe75585b75ef36980e3a170edc4c.zip |
Change to report format of tests which use Pnmpsnr
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3086 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/tiffcmyk-roundtrip.test')
-rwxr-xr-x | test/tiffcmyk-roundtrip.test | 25 |
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 |