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

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


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;

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

Furthermore, i added your example:

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

if (in==NULL)

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?


> Message du 10/01/06 17:46
> De: "Joris" <joris.at.lebbeke@skynet.be>
> A: tub95@wanadoo.fr, tiff@lists.maptools.org
> Copie à:
> Objet: Re: [Tiff] Problem closing TFF file: First Chance exception
> Bogoss,
> Please mail plain text messages only to mailing lists.
> Bogoss wrote:
> > I try to use libtiff library with a
> > Console Win32 Project and I’ve a problem to close an existing TIFF
> > file.
> >
> > I just do:
> >
> > TIFF *in;
> > In = TIFFOpen(“temp.tif”,”r”);
> > TIFFClose(in);
> >
> > I’ve an error on TIFFClose: First-Chance exception in test.exe
> > (NTDLL.DLL): 0x0000008: Invalid Handle
> Chances are this is because you've never received a proper TIFF* in the
> first place as a return of TIFFOpen, because the "temp.tif" wasn't
> found. Add an error check, like this.
> TIFF *in;
> In = TIFFOpen(“temp.tif”,”r”);
> if (In==NULL)
> /* some error occured */
> else
> TIFFClose(in);
> Probably things work better if you pass a full filename with complete
> path.
> For more information on TIFFOpen, including error return value, see

> http://www.remotesensing.org/libtiff/man/TIFFOpen.3tiff.html.

Joris Van Damme
Download your free TIFF tag viewer for windows here: