hide tiff warnings

This commit is contained in:
Alexey Buzanov 2013-07-01 19:48:21 +04:00
parent a130c45990
commit df0e214d46
2 changed files with 5 additions and 2 deletions

View File

@ -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())

View File

@ -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.