2005.12.03 14:46 "[Tiff] Call for OJPEG test images", by Joris Van Damme

2006.01.11 08:57 "RE: RE: [Tiff] Problem closing TFF file : First Chance exception", by Bogoss

Hello,

I think it's not the problem because my tiff file is correctly open.
It's correctly open because i can do for example (to know the tiff file resolution):

float resolution;
TIFFGetField(in,TIFFTAG_YRESOLUTION,&resolution);

I obtain the good result (196) in "resolution"

Furthermore, i added your example:

TIFF *in;
in = TIFFOpen(“temp.tif”,”r”);

if (!in)
    exit(1);

TIFFClose(in);

When i debug, it's specified that TIFF pointer "in" is not NULL and i have the same error on the instruction TIFFClose: First-Chance exception in test.exe (NTDLL.DLL): 0x0000008: Invalid Handle

Have you an other idea?

Thanks,
Thibaut

> Message-ID:
> <F78E6BBD22A6FC4489EBE25045407908036FA502@msg-mb2.icent.ic.gc.ca>
> Content-Type: text/plain; charset="utf-8"

I'd guess you're getting a NULL back from TIFFOpen, but then you're passing it to TIFFClose (which is not prepared to handle it), and it goes downhill from there.

Try adding a check, for example:

TIFF * in = TIFFOpen("temp.tif", "r");
if (!in)
{
   printf("oh noes!\n");
   exit(1);
}

TIFFClose(in);