From 157c936b970a19f58a279b9cbea81a36fcbb1b7e Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 21 Nov 2013 13:41:37 -0500 Subject: [PATCH] Use 8 bit per sample images in tests In compare image tests, use the gs device tiff24nc instead of tiff12nc since the 4 bit per sample images created by tiff12nc could sometimes trigger a bug in tiffcmp. Fixes #20. --- ChangeLog | 7 +++++++ qpdf/qtest/qpdf.test | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3642dbb..cd185d0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-11-21 Jay Berkenbilt + + * Change image comparison tests, which are disabled by default, to + use tiff files with 8 bits per sample rather than 4. This works + around a bug in tiffcmp but also increases time and disk space for + image comparison tests. + 2013-10-28 Jay Berkenbilt * Fix MacOS compilation errors by adding a missing #include in a diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index 1aff3d21..b0390cc1 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -2176,7 +2176,7 @@ sub compare_pdfs $td->runtest("convert original file to image", {$td->COMMAND => "(cd tif1;" . - " gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff12nc" . + " gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff24nc" . " -sOutputFile=a.tif - < ../$f1)"}, {$td->STRING => "", $td->EXIT_STATUS => 0}); @@ -2195,7 +2195,7 @@ sub compare_pdfs $td->runtest("convert new file to image", {$td->COMMAND => "(cd tif2;" . - " gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff12nc" . + " gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff24nc" . " -sOutputFile=a.tif - < ../$f2)"}, {$td->STRING => "", $td->EXIT_STATUS => 0});