summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-10 09:36:14 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-10 09:36:14 +0000
commit24966ffbda1ef1ebb47a6a1056fa20ee3f8ed0c1 (patch)
treeebd890213f56370c6b3bc6347e88dd9c37809025 /tests
parent666ef53fd24e4816ae8f63e19943a0257f3e1869 (diff)
[trunk] Fix compilation when TIFF lib is neither found nor compiled
Diffstat (limited to 'tests')
-rw-r--r--tests/compare_images.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/compare_images.c b/tests/compare_images.c
index 5dfd69d1..01ccd8e5 100644
--- a/tests/compare_images.c
+++ b/tests/compare_images.c
@@ -242,8 +242,10 @@ static opj_image_t* readImageFromFileTIF(const char* filename, int nbFilenamePGX
* TIFFOpen: /.../data/baseline/nonregression/opj_jp2_1.tif: Cannot open.
* On Win32 this open a message box by default, so remove it from the test suite:
*/
+#ifdef OPJ_HAVE_LIBTIFF
TIFFSetWarningHandler(NULL);
TIFFSetErrorHandler(NULL);
+#endif
/* If separator is empty => nb file to read is equal to one*/
if ( strlen(separator) == 0 )
@@ -271,11 +273,13 @@ static opj_image_t* readImageFromFileTIF(const char* filename, int nbFilenamePGX
filenameComponentPGX = createMultiComponentsFilename(filename, it_file, separator);
/* Read the tif file corresponding to the component */
+#ifdef OPJ_HAVE_LIBTIFF
image_read = tiftoimage(filenameComponentPGX, &parameters);
+#endif
if (!image_read)
{
int it_free_data;
- fprintf(stderr, "Unable to load pgx file\n");
+ fprintf(stderr, "Unable to load TIF file\n");
free(param_image_read);