diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-02-09 02:33:16 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-02-09 02:33:16 +0000 |
commit | 233fc3732e9f5e5f8e4987f23adac923b62a5798 (patch) | |
tree | 0232e04ea5af306775525fef3a9a44ce3deaf873 /test/tiff-flate-lzw-roundtrip.test | |
parent | 4d8afd9f91b028c5d23ee7229ae8687c67a6fb3d (diff) | |
download | netpbm-mirror-233fc3732e9f5e5f8e4987f23adac923b62a5798.tar.gz netpbm-mirror-233fc3732e9f5e5f8e4987f23adac923b62a5798.tar.xz netpbm-mirror-233fc3732e9f5e5f8e4987f23adac923b62a5798.zip |
Various new tests and other test improvements from afu
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2888 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/tiff-flate-lzw-roundtrip.test')
-rwxr-xr-x | test/tiff-flate-lzw-roundtrip.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/tiff-flate-lzw-roundtrip.test b/test/tiff-flate-lzw-roundtrip.test new file mode 100755 index 00000000..dda5b9f9 --- /dev/null +++ b/test/tiff-flate-lzw-roundtrip.test @@ -0,0 +1,40 @@ +#! /bin/bash +# This script tests: pamtotiff tifftopnm +# Also requires: pnmquant + +# Failure message +## If tiff-rountrip.test succeeds and this test fails, the likely +## cause is an old TIFF library which lacks certain compression +## features. + +tmpdir=${tmpdir:-/tmp} + +test40_ppm=${tmpdir}/testimg.ppm +test1_tiff=${tmpdir}/test1.tiff +test2_tiff=${tmpdir}/test2.tiff +test3_tiff=${tmpdir}/test3.tiff +test4_tiff=${tmpdir}/test4.tiff + +# Make a test image with reduced colors which compresses better +# cksum is 764594701 101484 + +pnmquant 40 testimg.ppm | tee ${test40_ppm} | cksum + +# test flate compression +pamtotiff -flate ${test40_ppm} 1<>${test1_tiff} && + tifftopnm ${test1_tiff} | cksum + +# test adobeflate compression +pamtotiff -adobeflate ${test40_ppm} 1<>${test2_tiff} && + tifftopnm ${test2_tiff} | cksum + +# test LZW compression +pamtotiff -lzw ${test40_ppm} 1<>${test3_tiff} && + tifftopnm ${test3_tiff} | cksum + +# PBM image: test flate compression +pamtotiff -flate testgrid.pbm 1<>${test4_tiff} && + tifftopnm ${test4_tiff} | cksum + +rm ${test40_ppm} ${test1_tiff} ${test2_tiff} ${test3_tiff} ${test4_tiff} + |