2020.02.03 16:30 "[Tiff] Problem with 4.1.0 of libtiff.", by David C. Partridge

2020.02.04 13:37 "Re: [Tiff] Problem with 4.1.0 of libtiff.", by David C. Partridge

I think I've found the culprit in my code. Well you always *knew* that's where it was!

I recently added some code to read the EXIF tags which calls TIFFReadEXIFDirectory, which appears switch the active directory (or something of the sort) in the tiff file with the result that the information on the image itself is no longer accessible.

After I've finished reading the EXIF tags how do I get back to the original (default) directory (or sub-directory if that's what changed) which refers to the image data?

Thanks

David

Being dense at this end - couldn't make sense of the gm help to do what you suggest.

Please could you suggest a suitable command line to check the file?

PS This file and all the others worked with the previous release of libtiff that I used.

File is 48MB, so can't attach to an email. You can DL it from:

<www.perdrix.co.uk/pix/DSC_0782_ISO_00400.TIF>

I'm sure the image is fine as it opens perfectly in Advanced TIFF Editor Plus. It's almost certain that the problem is with my build of libtiff or something I've managed to break in my client code (though I've been through my recent changes with a fine tooth comb several times).

On Tue, 4 Feb 2020, David C. Partridge wrote:

> I've been doing some more digging:
>

> TIFFScanlineSize(m_tiff) is returning ZERO even though m_tiff->tif_scanlinesize is 14784 (which is correct for the 4928 wide image).

Have you checked if GraphicsMagick for Windows (also using 4.1.0) can read it? If it also fails, then then the problem is not on your end and may actually be in libtiff.

The installer can be downloaded from https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick-binarie s/1.3.34/

Also, if you can provide the TIFF file, then it can be verified if others (e.g. me) also encounter the problem.

Bob
--

bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/

GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/