diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 296125f04..095226f84 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -78,6 +78,5 @@ def test_adobe_deflate_tiff(): assert_equal(im.mode, "RGB") assert_equal(im.size, (278, 374)) - assert_equal(im.tile, [('tiff_adobe_deflate', (0, 0, 278, 374), 0, - ('RGB', 'tiff_adobe_deflate', 4))]) + assert_equal(im.tile[0][:3], ('tiff_adobe_deflate', (0, 0, 278, 374), 0)) assert_no_exception(lambda: im.load()) diff --git a/libImaging/TiffDecode.c b/libImaging/TiffDecode.c index 8acea0317..d535a5033 100644 --- a/libImaging/TiffDecode.c +++ b/libImaging/TiffDecode.c @@ -197,6 +197,10 @@ int ImagingLibTiffDecode(Imaging im, ImagingCodecState state, UINT8* buffer, int clientstate->flrealloc = 0; dump_state(clientstate); + + TIFFSetWarningHandler(NULL); + TIFFSetWarningHandlerExt(NULL); + if (clientstate->fp) { TRACE(("Opening using fd: %d\n",clientstate->fp)); lseek(clientstate->fp,0,SEEK_SET); // Sometimes, I get it set to the end.