diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:21:21 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:21:21 +0000 |
commit | 0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0 (patch) | |
tree | 3e8db9f13fb33464324c6986e7d80540a42a86c7 /test/fiasco-roundtrip.test | |
parent | 7dd37058c4c8e0f6ca272e329162a52f958e4951 (diff) | |
download | netpbm-mirror-0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0.tar.gz netpbm-mirror-0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0.tar.xz netpbm-mirror-0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0.zip |
promote Stable to Super Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@4557 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/fiasco-roundtrip.test')
-rwxr-xr-x | test/fiasco-roundtrip.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/fiasco-roundtrip.test b/test/fiasco-roundtrip.test new file mode 100755 index 00000000..8325a37d --- /dev/null +++ b/test/fiasco-roundtrip.test @@ -0,0 +1,23 @@ +#! /bin/bash +# This script tests: pnmtofiasco fiascotopnm +# Also requires: pnmpad pnmpsnr + +# Pnmtofiasco: number of rows, cols in input file must be even +# Pnmpsnr output: 15.11 22.71 30.09 +# TODO: As in jpeg-rountrip.test the threshold has been determined +# without much thought. + +# Should print 3 1000.00 1000.00 1000.00 + +tmpdir=${tmpdir:-/tmp} +padded_ppm=${tmpdir}/padded.ppm + +pnmpad --black --bottom 1 --left 1 testimg.ppm > ${padded_ppm} && +pnmtofiasco --progress-meter 0 ${padded_ppm} | fiascotopnm | \ + pnmpsnr -machine - ${padded_ppm} | \ + awk '{printf("%3d %.2f %.2f %.2f", NF, + $1>14.0 ? 1000.00 : $1, + $2>21.0 ? 1000.00 : $2, + $3>29.0 ? 1000.00 : $3) }' + +rm ${padded_ppm} \ No newline at end of file |