2018.11.13 14:14 "[Tiff] TIFF image has depth 0, bits per sample value 16 and samples per pixel value of 1", by Olumide

2018.11.13 16:57 "Re: [Tiff] TIFF image has depth 0, bits per sample value 16 and samples per pixel value of 1", by Bob Friesenhahn

// Returns 0
TIFFGetField( tif, TIFFTAG_IMAGEDEPTH, &depth );

The ImageDepth however, is as far as I know a non-standard extension for describing the Z dimension size, to complement ImageWidth and ImageHeight. Is the tag actually present in the source image, if you run tiffinfo on it?

If not present, I would have thought it would be logical for it to default to 1 rather than 0, since it's still a plane of depth 1.

If it is present with a size of 0, that would seem to be a broken image.

  Maybe something which libtiff might be able to work around?

None of the TIFFGetField() calls checked the return status to see if there was a failure (e.g. tag not present) so returning 0 seems ok since this is not the "defaulted" version.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt