TIFFGetField ============ Synopsis -------- .. highlight:: c :: #include #include .. c:function:: int TIFFGetField(TIFF* tif, ttag_t tag, ...) .. c:function:: int TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap) .. c:function:: int TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, ...) .. c:function:: int TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap) Description ----------- :c:func:`TIFFGetField` returns the value of a tag or pseudo-tag associated with the the current directory of the opened TIFF file *tif*. (A *pseudo-tag* is a parameter that is used to control the operation of the TIFF library but whose value is not read or written to the underlying file.) The file must have been previously opened with :c:func:`TIFFOpen`. The tag is identified by *tag*, one of the values defined in the include file :file:`tiff.h` (see also the table below). The type and number of values returned is dependent on the tag being requested. The programming interface uses a variable argument list as prescribed by the :file:`stdarg.h` interface. The returned values should only be interpreted if :c:func:`TIFFGetField` returns 1. :c:func:`TIFFVGetField` is functionally equivalent to :c:func:`TIFFGetField` except that it takes a pointer to a variable argument list. :c:func:`TIFFVGetField` is useful for layering interfaces on top of the functionality provided by :c:func:`TIFFGetField`. :c:func:`TIFFGetFieldDefaulted` and :c:func:`TIFFVGetFieldDefaulted` are identical to :c:func:`TIFFGetField` and :c:func:`TIFFVGetField`, respectively, except that if a tag is not defined in the current directory and it has a default value, then the default value is returned. The tags understood by :program:`libtiff` the number of parameter values, and the types for the returned values are shown below. The data types are specified as in C and correspond to the types used to specify tag values to :c:func:`TIFFSetField`. Remember that :c:func:`TIFFGetField` returns parameter values, so all the listed data types are pointers to storage where values should be returned. Consult the TIFF specification (or relevant industry specification) for information on the meaning of each tag and their possible values. .. list-table:: Tag properties :widths: 5 3 5 10 :header-rows: 1 * - Tag name - Count - Types - Notes * - :c:macro:`TIFFTAG_ARTIST` - 1 - :c:expr:`const char**` - * - :c:macro:`TIFFTAG_BADFAXLINES` - 1 - :c:expr:`uint32_t*` - * - :c:macro:`TIFFTAG_BITSPERSAMPLE` - 1 - :c:expr:`uint16_t*` - * - :c:macro:`TIFFTAG_CLEANFAXDATA` - 1 - :c:expr:`uint16_t*` - * - :c:macro:`TIFFTAG_COLORMAP` - 3 - :c:expr:`const uint16_t**` - :c:expr:`1<