Current File : //usr/man/man3tiff/TIFFSetField.3tiff
'\" te
.TH TIFFSetField 3tiff "05 Apr 2004" "" ""
.SH "NAME"
TIFFSetField, TIFFVSetField \- set the value(s) of a tag in a TIFF file
open for writing
.SH "SYNOPSIS"
.sp
.nf
\f(CW#include <tiffio\&.h>
int TIFFSetField(TIFF* tif, ttag_t tag, \&.\&.\&.)
#include <stdarg\&.h>
int TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)\fR
.fi
.sp
.SH ""
.PP
\fBTIFFSetField\fR sets the value of a field or pseudo-tag
in the current directory associated with 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\&.
.PP
To set the value of a field, the file must have been previously opened
for writing with \fBTIFFOpen(3tiff)\fR\&. Pseudo-tags can be set whether
the file was opened for reading or writing\&.
.PP
The field is identified by \fBtag\fR, one of the values
defined in the include file \fBtiff\&.h\fR (see also the table
below)\&. The actual value is specified using a variable argument list as prescribed
by the \fBstdarg(3)\fR interface, or, on some machines, the \fBvarargs(3)\fR interface\&.
.SH "EXTENDED DESCRIPTION"
.PP
\fBTIFFVSetField\fR is functionally equivalent to \fBTIFFSetField\fR except that \fBTIFFVSetField\fR takes
a pointer to a variable argument list\&. \fBTIFFVSetField\fR is
useful for writing routines that are layered on top of the functionality provided
by \fBTIFFSetField\fR\&.
.PP
The tags understood by \fBlibtiff\fR, the number of parameter
values, and the expected types for the parameter values are shown below\&. The
data types are as follows:
.sp
.ne 2
.mk
\fB\fBchar*\fR\fR
.sp .6
.in +4
Null-terminated
string, corresponds to the ASCII data type
.sp
.sp 1
.in -4
.sp
.ne 2
.mk
\fB\fBuint16\fR\fR
.sp .6
.in +4
Unsigned
16-bit value
.sp
.sp 1
.in -4
.sp
.ne 2
.mk
\fB\fBuint32\fR\fR
.sp .6
.in +4
Unsigned
32-bit value
.sp
.sp 1
.in -4
.sp
.ne 2
.mk
\fB\fBuint16*\fR\fR
.sp .6
.in +4
Array
of unsigned 16-bit values
.sp
.sp 1
.in -4
.sp
.ne 2
.mk
\fB\fBvoid*\fR\fR
.sp .6
.in +4
Array of
data values of unspecified type
.sp
.sp 1
.in -4
.PP
Consult the TIFF specification for information on the
meaning of each tag\&.
.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\(em
\fBTIFFTAG_CLEANFAXDATA\fR1\fBuint16\fR
\fBTIFFTAG_COLORMAP\fR3\fBuint16*\fRT{
1<<BitsPerSample
arrays
T}
\fBTIFFTAG_COMPRESSION\fR1\fBuint16\fR\(em
\fBTIFFTAG_CONSECUTIVEBADFAXLINES\fR1\fBuint32\fR
\fBTIFFTAG_DATETIME\fR1\fBchar*\fR
\fBTIFFTAG_DOCUMENTNAME\fR1\fBchar*\fR
\fBTIFFTAG_DOTRANGE\fR2\fBuint16\fR
\fBTIFFTAG_EXTRASAMPLES\fR2\fBuint16\fR,\fBuint16*\fR\(em count and types array
\fBTIFFTAG_FAXMODE\fR1\fBint\fRT{
\(em G3/G4
compression pseudo-tag
T}
\fBTIFFTAG_FAXFILLFUNC\fR1\fBTIFFFaxFillFunc\fRG3/G4 compression pseudo-tag
\fBTIFFTAG_FILLORDER\fR1\fBuint16\fR\(em
\fBTIFFTAG_GROUP3OPTIONS\fR1\fBuint32\fR\(em
\fBTIFFTAG_GROUP4OPTIONS\fR1\fBuint32\fR\(em
\fBTIFFTAG_HALFTONEHINTS\fR2\fBuint16\fR
\fBTIFFTAG_HOSTCOMPUTER\fR1\fBchar*\fR
\fBTIFFTAG_IMAGEDEPTH\fR1\fBuint32\fR\(em
\fBTIFFTAG_IMAGEDESCRIPTION\fR1\fBchar*\fR
\fBTIFFTAG_IMAGELENGTH\fR1\fBuint32\fR
\fBTIFFTAG_IMAGEWIDTH\fR1\fBuint32\fR\(em
\fBTIFFTAG_INKNAMES\fR1\fBchar*\fR
\fBTIFFTAG_INKSET\fR1\fBuint16\fR\(em
\fBTIFFTAG_JPEGTABLES\fR2\fBuint32*\fR,\fBvoid*\fR\(em count and tables
\fBTIFFTAG_JPEGQUALITY\fR1\fBint\fRJPEG pseudo-tag
\fBTIFFTAG_JPEGCOLORMODE\fR1\fBint\fR\(em JPEG pseudo-tag
\fBTIFFTAG_JPEGTABLESMODE\fR1\fBint\fR\(em JPEG pseudo-tag
\fBTIFFTAG_MAKE\fR1\fBchar*\fR
\fBTIFFTAG_MATTEING\fR1\fBuint16\fR\(em
\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\(em
\fBTIFFTAG_PREDICTOR\fR1\fBuint16\fR\(em
\fBTIFFTAG_PRIMARYCHROMACITIES\fR1\fBfloat*\fR6-entry array
\fBTIFFTAG_REFERENCEBLACKWHITE\fR1\fBfloat*\fRT{
- 2*SamplesPerPixel array
T}
\fBTIFFTAG_RESOLUTIONUNIT\fR1\fBuint16\fR
\fBTIFFTAG_ROWSPERSTRIP\fR1\fBuint32\fR\(em must be greater than 0
\fBTIFFTAG_SAMPLEFORMAT\fR1\fBuint16\fR\(em
\fBTIFFTAG_SAMPLESPERPIXEL\fR1\fBuint16\fRT{
\(em value must be <= 4
T}
\fBTIFFTAG_SMAXSAMPLEVALUE\fR1\fBdouble\fR
\fBTIFFTAG_SMINSAMPLEVALUE\fR1\fBdouble\fR
\fBTIFFTAG_SOFTWARE\fR1\fBchar*\fR
\fBTIFFTAG_STONITS\fR1\fBdouble\fR\(em
\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_TILEDEPTH\fR1\fBuint32\fR\(em
\fBTIFFTAG_TILELENGTH\fR1\fBuint32\fRT{
\(em must be a multiple of 8
T}
\fBTIFFTAG_TILEWIDTH\fR1\fBuint32\fRT{
\(em must be a multiple of 8
T}
\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*\fR- 3-entry array
\fBTIFFTAG_YCBCRPOSITIONING\fR1\fBuint16\fR\(em
\fBTIFFTAG_YCBCRSUBSAMPLING\fR2\fBuint16\fR\(em
\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
Tag may not have its values
changed once data is written\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fB=\fR
.in +24n
.rt
If \fBSamplesPerPixel\fR
is 1, then a single array is passed\&. Otherwise, three arrays should be passed\&.
.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
\fB%s: Cannot modify tag "%s" while writing\&.\fR
.in +24n
.rt
Data has already been written to the file, so the specified tag value
cannot be changed\&. This restriction is applied to all tags that affect the
format of written data\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fB%d: Bad value for "%s"\&.\fR
.in +24n
.rt
An invalid
value was supplied for the named tag\&.
.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), \fBTIFFGetField\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