TIFFFIELDPASSCOUNT(3tiff)

NAME
TIFFFieldPassCount - get whether to pass a count to TIFFGetField/TIFFSetField

SYNOPSIS

    #include <tiffio.h>

int TIFFFieldPassCount(const TIFFField *fip)

DESCRIPTION

TIFFFieldPassCount() returns true (nonzero) if TIFFGetField() <#c.TIFFGetField> and TIFFSetField() <#c.TIFFSetField> expect a count value to be passed before the actual data pointer.

fip is a field information pointer previously returned by TIFFFindField() <#c.TIFFFindField>, TIFFFieldWithTag() <#c.TIFFFieldWithTag>, TIFFFieldWithName() <#c.TIFFFieldWithName>.

When a count is required, it will be of type uint32_t if TIFFFieldReadCount() <#c.TIFFFieldReadCount> reports TIFF_VARIABLE2, and of type uint16_t otherwise. Use TIFFFieldWriteCount() <#c.TIFFFieldWriteCount> for TIFFSetField() <#c.TIFFSetField>, respectively. (This distinction is critical for use of TIFFGetField() <#c.TIFFGetField>, but normally not so for use of TIFFSetField() <#c.TIFFSetField>.)

An alternative function for the count value determination is TIFFFieldSetGetCountSize() <#c.TIFFFieldSetGetCountSize>.

RETURN VALUES

TIFFFieldPassCount() returns an integer that is always 1 (true) or 0 (false).

SEE ALSO

TIFFFieldDataType <> (3tiff), TIFFFieldName <> (3tiff), TIFFFieldQuery <> (3tiff), TIFFFieldReadCount <> (3tiff), TIFFFieldTag <> (3tiff), TIFFFieldWriteCount <> (3tiff), libtiff <>

Author
LibTIFF contributors

Copyright
1988-2025, LibTIFF contributors