[trunk] Also override the default error handler for TIFF files

This commit is contained in:
Mathieu Malaterre 2014-03-07 14:33:03 +00:00
parent ffad2fbe55
commit 440ef4873b

View File

@ -149,11 +149,13 @@ static opj_image_t* readImageFromFileTIF(const char* filename, int nbFilenamePGX
opj_image_cmptparm_t* param_image_read;
int** data;
/* conformance test suite produce annoying warning:
/* conformance test suite produce annoying warning/error:
* TIFFReadDirectory: Warning, /.../data/baseline/conformance/jp2_1.tif: unknown field with tag 37724 (0x935c) encountered.
* 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:
*/
TIFFSetWarningHandler(NULL);
TIFFSetErrorHandler(NULL);
/* If separator is empty => nb file to read is equal to one*/
if ( strlen(separator) == 0 )