Current File : //usr/share/man/man3tiff/TIFFGetField.3tiff
'\" te
.TH TIFFGetField 3tiff "05 Apr 2004" "" ""
.SH "NAME"
TIFFGetField, TIFFVGetField, TIFFGetFieldDefaulted, TIFFVGetFieldDefaulted \- get the value(s) of a tag in an open TIFF file
.SH "SYNOPSIS"
.sp
.nf
\f(CW#include <tiffio\&.h>
int TIFFGetField(TIFF* tif, ttag_t tag, \&.\&.\&.)
#include <stdarg\&.h>
int TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
int TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, \&.\&.\&.)
int TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list
ap)\fR
.fi
.sp
.SH ""
.PP
\fBTIFFGetField\fR returns the value of a tag or pseudo-tag
associated with the current directory of the open TIFF file\&. 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 \fBTIFFOpen(3tiff)\fR\&. The tag is
identified by \fBtag\fR, one of the values defined in the include
file \fBtiff\&.h\fR (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 \fBstdarg(3)\fR interface\&. The returned values should only be interpreted if \fBTIFFGetField\fR returns 1\&.
.SH ""
.PP
\fBTIFFVGetField\fR is functionally equivalent to \fBTIFFGetField\fR except that \fBTIFFVGetField\fR takes
a pointer to a variable argument list\&. \fBTIFFVGetField\fR is
useful for layering interfaces on top of the functionality provided by \fBTIFFGetField\fR\&.
.PP
\fBTIFFGetFieldDefaulted\fR and \fBTIFFVGetFieldDefaulted\fR are identical to \fBTIFFGetField\fR and \fBTIFFVGetField\fR, except that if a tag is not defined in the current
directory and has a default value, then the default value is returned\&.
.PP
The tags understood by \fBlibtiff\fR, 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 \fBTIFFSetField(3tiff)\fR\&. Remember that \fBTIFFGetField\fR returns parameter values, so all of the listed data types are pointers
to storage where values should be returned\&. Consult the TIFF specification
for information on the meaning of each tag and their possible values\&.
.sp
.TS
tab() allbox;
lw(1.375000i)| lw(1.375000i)| lw(1.375000i)| lw(1.375000i).
TAG NAMECOUNTTYPESNOTES
\fBTIFFTAG_ARTIST\fR1\fBchar**\fR
\fBTIFFTAG_BADFAXLINES\fR1\fBuint32*\fR
\fBTIFFTAG_BITSPERSAMPLE\fR1\fBuint16*\fR
\fBTIFFTAG_CLEANFAXDATA\fR1\fBuint16*\fR
\fBTIFFTAG_COLORMAP\fR3\fBuint16**\fRT{
1<<BitsPerSample
arrays
T}
\fBTIFFTAG_COMPRESSION\fR1\fBuint16*\fR
\fBTIFFTAG_CONSECUTIVEBADFAXLINES\fR1\fBuint32*\fR
\fBTIFFTAG_DATATYPE\fR1\fBuint16*\fR
\fBTIFFTAG_DATETIME\fR1\fBchar**\fR
\fBTIFFTAG_DOCUMENTNAME\fR1\fBchar**\fR
\fBTIFFTAG_DOTRANGE\fR2\fBuint16*\fR
\fBTIFFTAG_EXTRASAMPLES\fR2\fBuint16*\fR,\fBuint16**\fRcount and types array
\fBTIFFTAG_FAXMODE\fR1\fBint*\fRG3/G4 compression
pseudo-tag
\fBTIFFTAG_FAXFILLFUNC\fR1\fBTIFFFaxFillFunc*\fRG3/G4 compression pseudo-tag
\fBTIFFTAG_FILLORDER\fR1\fBuint16*\fR
\fBTIFFTAG_GROUP3OPTIONS\fR1\fBuint32*\fR
\fBTIFFTAG_GROUP4OPTIONS\fR1\fBuint32*\fR
\fBTIFFTAG_HALFTONEHINTS\fR2\fBuint16*\fR
\fBTIFFTAG_HOSTCOMPUTER\fR1\fBchar**\fR
\fBTIFFTAG_IMAGEDEPTH\fR1\fBuint32*\fR
\fBTIFFTAG_IMAGEDESCRIPTION\fR1\fBchar**\fR
\fBTIFFTAG_IMAGELENGTH\fR1\fBuint32*\fR
\fBTIFFTAG_IMAGEWIDTH\fR1\fBuint32*\fR
\fBTIFFTAG_INKNAMES\fR1\fBchar**\fR
\fBTIFFTAG_INKSET\fR1\fBuint16*\fR
\fBTIFFTAG_JPEGTABLES\fR2\fBu_short*\fR,\fBvoid**\fRcount and tables
\fBTIFFTAG_JPEGQUALITY\fR1\fBint*\fRJPEG pseudo-tag
\fBTIFFTAG_JPEGCOLORMODE\fR1\fBint*\fRJPEG pseudo-tag
\fBTIFFTAG_JPEGTABLESMODE\fR1\fBint*\fRJPEG pseudo-tag
\fBTIFFTAG_MAKE\fR1\fBchar**\fR
\fBTIFFTAG_MATTEING\fR1\fBuint16*\fR
\fBTIFFTAG_MAXSAMPLEVALUE\fR1\fBuint16*\fR
\fBTIFFTAG_MINSAMPLEVALUE\fR1\fBuint16*\fR
\fBTIFFTAG_MODEL\fR1\fBchar**\fR
\fBTIFFTAG_ORIENTATION\fR1\fBuint16*\fR
\fBTIFFTAG_PAGENAME\fR1\fBchar**\fR
\fBTIFFTAG_PAGENUMBER\fR2\fBuint16*\fR
\fBTIFFTAG_PHOTOMETRIC\fR1\fBuint16*\fR
\fBTIFFTAG_PLANARCONFIG\fR1\fBuint16*\fR
\fBTIFFTAG_PREDICTOR\fR1\fBuint16*\fR
\fBTIFFTAG_PRIMARYCHROMACITIES\fR1\fBfloat**\fR6-entry array
\fBTIFFTAG_REFERENCEBLACKWHITE\fR1\fBfloat**\fR2*SamplesPerPixel array
\fBTIFFTAG_RESOLUTIONUNIT\fR1\fBuint16*\fR
\fBTIFFTAG_ROWSPERSTRIP\fR1\fBuint32*\fR
\fBTIFFTAG_SAMPLEFORMAT\fR1\fBuint16*\fR
\fBTIFFTAG_SAMPLESPERPIXEL\fR1\fBuint16*\fR
\fBTIFFTAG_SMAXSAMPLEVALUE\fR1\fBdouble*\fR
\fBTIFFTAG_SMINSAMPLEVALUE\fR1\fBdouble*\fR
\fBTIFFTAG_SOFTWARE\fR1\fBchar**\fR
\fBTIFFTAG_STONITS\fR1\fBdouble**\fR
\fBTIFFTAG_STRIPBYTECOUNTS\fR1\fBuint32**\fR
\fBTIFFTAG_STRIPOFFSETS\fR1\fBuint32**\fR
\fBTIFFTAG_SUBFILETYPE\fR1\fBuint32*\fR
\fBTIFFTAG_SUBIFD\fR2\fBuint16*\fR,\fBuint32**\fRcount and offsets array
\fBTIFFTAG_TARGETPRINTER\fR1\fBchar**\fR
\fBTIFFTAG_THRESHOLDING\fR1\fBuint16*\fR
\fBTIFFTAG_TILEBYTECOUNTS\fR1\fBuint32**\fR
\fBTIFFTAG_TILEDEPTH\fR1\fBuint32*\fR
\fBTIFFTAG_TILELENGTH\fR1\fBuint32*\fR
\fBTIFFTAG_TILEOFFSETS\fR1\fBuint32**\fR
\fBTIFFTAG_TILEWIDTH\fR1\fBuint32*\fR
\fBTIFFTAG_TRANSFERFUNCTION\fR1 or 3-\fBuint16**\fRT{
1<<BitsPerSample entry arrays
T}
\fBTIFFTAG_WHITEPOINT\fR1\fBfloat**\fR2-entry array
\fBTIFFTAG_XPOSITION\fR1\fBfloat*\fR
\fBTIFFTAG_XRESOLUTION\fR1\fBfloat*\fR
\fBTIFFTAG_YCBCRCOEFFICIENTS\fR1\fBfloat**\fR3-entry array
\fBTIFFTAG_YCBCRPOSITIONING\fR1\fBuint16*\fR
\fBTIFFTAG_YCBCRSUBSAMPLING\fR2\fBuint16*\fR
\fBTIFFTAG_YPOSITION\fR1\fBfloat*\fR
\fBTIFFTAG_YRESOLUTION\fR1\fBfloat*\fR
\fBTIFFTAG_ICCPROFILE\fR2\fBuint32*\fR,\fBvoid**\fRcount, profile data=
.TE
.sp
.sp
.ne 2
.mk
\fB-\fR
.in +24n
.rt
If \fBSamplesPerPixel\fR is 1, then a single array is returned\&. Otherwise, three arrays
are returned\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fB=\fR
.in +24n
.rt
The contents of this field are
quite complex\&. See \fIThe ICC Profile Format Specification, Annex
B "Embedding ICC Profiles in TIFF Files"\fR, available at
\fBhttp://www\&.color\&.org\fR, for an explanation\&.
.sp
.sp 1
.in -24n
.SS "Diagnostics"
.PP
All error messages are directed to the \fBTIFFError(3tiff)\fR
routine\&.
.sp
.ne 2
.mk
\fBUnknown field, tag 0x%x\&.\fR
.in +24n
.rt
An unknown
tag was supplied\&.
.sp
.sp 1
.in -24n
.SH ""
.PP
1 is returned if the tag is defined in the current directory\&. Otherwise,
0 is returned\&.
.SH ""
.PP
See \fBattributes\fR(5)
for descriptions of the following attributes:
.sp
.TS
tab() allbox;
cw(2.750000i)| cw(2.750000i)
lw(2.750000i)| lw(2.750000i).
ATTRIBUTE TYPEATTRIBUTE VALUE
Availabilityimage/library/libtiff
Interface stabilityUncommitted
.TE
.sp
.SH ""
.PP
\fBlibtiff\fR(3), \fBTIFFOpen\fR(3tiff), \fBTIFFSetField\fR(3tiff), \fBTIFFSetDirectory\fR(3tiff), \fBTIFFReadDirectory\fR(3tiff), \fBTIFFWriteDirectory\fR(3tiff)
.SH ""
.PP
This man page was originally written by Sam Leffler\&. Updated by Breda
McColgan, Sun Microsystems Inc\&., 2004\&.
...\" created by instant / solbook-to-man, Thu 20 Mar 2014, 02:30
...\" LSARC 2003/085 libtiff, libjpeg, and libpng