.\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. .\" .\" Permission to use, copy, modify, distribute, and sell this software and .\" its documentation for any purpose is hereby granted without fee, provided .\" that (i) the above copyright notices and this permission notice appear in .\" all copies of the software and related documentation, and (ii) the names of .\" Sam Leffler and Silicon Graphics may not be used in any advertising or .\" publicity relating to the software without the specific, prior written .\" permission of Sam Leffler and Silicon Graphics. .\" .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. .\" .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR .\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, .\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE .\" OF THIS SOFTWARE. .\" .if n .po 0 .TH TIFFGetField 3TIFF "March 18, 2005" "libtiff" .SH NAME TIFFGetField, TIFFVGetField \- get the value(s) of a tag in an open .SM TIFF file .SH SYNOPSIS .B "#include " .sp .BI "int TIFFGetField(TIFF *" tif ", ttag_t " tag ", " ... ")" .sp .B "#include " .sp .BI "int TIFFVGetField(TIFF *" tif ", ttag_t " tag ", va_list " ap ")" .br .BI "int TIFFGetFieldDefaulted(TIFF *" tif ", ttag_t " tag ", " ... ")" .br .BI "int TIFFVGetFieldDefaulted(TIFF *" tif ", ttag_t " tag ", va_list " ap ")" .SH DESCRIPTION .IR TIFFGetField returns the value of a tag or pseudo-tag associated with the the current directory of the opened .SM TIFF file .IR tif . (A .I pseudo-tag is a parameter that is used to control the operation of the .SM TIFF library but whose value is not read or written to the underlying file.) The file must have been previously opened with .IR TIFFOpen (3TIFF). The tag is identified by .IR tag , one of the values defined in the include file .B 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 .IR stdarg (3) interface. The returned values should only be interpreted if .IR TIFFGetField returns 1. .PP .IR TIFFVGetField is functionally equivalent to .IR TIFFGetField except that it takes a pointer to a variable argument list. .I TIFFVGetField is useful for layering interfaces on top of the functionality provided by .IR TIFFGetField . .PP .IR TIFFGetFieldDefaulted and .IR TIFFVGetFieldDefaulted are identical to .IR TIFFGetField and .IR TIFFVGetField , except that if a tag is not defined in the current directory and it has a default value, then the default value is returned. .PP The tags understood by .IR libtiff(3TIFF), 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 .IR TIFFSetField (3TIFF). Remember that .IR TIFFGetField returns parameter values, so all the listed data types are pointers to storage where values should be returned. Consult the .SM TIFF specification (or relevant industry specification) for information on the meaning of each tag and their possible values. .PP .nf .ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc*'u+2n \fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP .sp 5p TIFFTAG_ARTIST 1 const char** TIFFTAG_BADFAXLINES 1 uint32* TIFFTAG_BITSPERSAMPLE 1 uint16* TIFFTAG_CLEANFAXDATA 1 uint16* TIFFTAG_COLORMAP 3 const uint16** 1<