]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/man/TIFFSetField.3tiff
Second part of #15224 fix: AddRows, AddColumns (dghart)
[wxWidgets.git] / src / tiff / man / TIFFSetField.3tiff
CommitLineData
8414a40c
VZ
1.\"
2.\" Copyright (c) 1988-1997 Sam Leffler
3.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
4.\"
5.\" Permission to use, copy, modify, distribute, and sell this software and
6.\" its documentation for any purpose is hereby granted without fee, provided
7.\" that (i) the above copyright notices and this permission notice appear in
8.\" all copies of the software and related documentation, and (ii) the names of
9.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
10.\" publicity relating to the software without the specific, prior written
11.\" permission of Sam Leffler and Silicon Graphics.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16.\"
17.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22.\" OF THIS SOFTWARE.
23.\"
24.if n .po 0
25.TH TIFFSetField 3TIFF "October 29, 2004" "libtiff"
26.SH NAME
27TIFFSetField, TIFFVSetField \- set the value(s) of a tag in a
28.SM TIFF
29file open for writing
30.SH SYNOPSIS
31.B "#include <tiffio.h>"
32.sp
33.BI "int TIFFSetField(TIFF *" tif ", ttag_t " tag ", " ... ")"
34.sp
35.B "#include <stdarg.h>"
36.sp
37.BI "int TIFFVSetField(TIFF *" tif ", ttag_t " tag ", va_list " ap ")"
38.SH DESCRIPTION
39.IR TIFFSetField
40sets the value of a field
41or pseudo-tag in the current directory associated with
42the open
43.SM TIFF
44file
45.IR tif .
46(A
47.I pseudo-tag
48is a parameter that is used to control the operation of the
49.SM TIFF
50library but whose value is not read or written to the underlying file.)
51To set the value of a field
52the file must have been previously opened for writing with
53.IR TIFFOpen (3TIFF);
54pseudo-tags can be set whether the file was opened for reading
55or writing.
56The field is identified by
57.IR tag ,
58one of the values defined in the include file
59.B tiff.h
60(see also the table below).
61The actual value is specified using a variable argument list,
62as prescribed by the
63.IR stdarg (3)
64interface (\c
65or, on some machines, the
66.IR varargs (3)
67interface.)
68.PP
69.IR TIFFVSetField
70is functionally equivalent to
71.IR TIFFSetField
72except that it takes a pointer to a variable
73argument list.
74.I TIFFVSetField
75is useful for writing routines that are layered
76on top of the functionality provided by
77.IR TIFFSetField .
78.PP
79The tags understood by
80.IR libtiff ,
81the number of parameter values, and the
82expected types for the parameter values are shown below.
83The data types are:
84.I char*
85is null-terminated string and corresponds to the
86.SM ASCII
87data type;
88.I uint16
89is an unsigned 16-bit value;
90.I uint32
91is an unsigned 32-bit value;
92.I uint16*
93is an array of unsigned 16-bit values.
94.I void*
95is an array of data values of unspecified type.
96
97Consult the
98.SM TIFF
99specification for information on the meaning of each tag.
100.PP
101.nf
102.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc \(dg'u+2n
103\fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP
104.sp 5p
105TIFFTAG_ARTIST 1 char*
106TIFFTAG_BADFAXLINES 1 uint32
107TIFFTAG_BITSPERSAMPLE 1 uint16 \(dg
108TIFFTAG_CLEANFAXDATA 1 uint16
109TIFFTAG_COLORMAP 3 uint16* 1<<BitsPerSample arrays
110TIFFTAG_COMPRESSION 1 uint16 \(dg
111TIFFTAG_CONSECUTIVEBADFAXLINES 1 uint32
112TIFFTAG_COPYRIGHT 1 char*
113TIFFTAG_DATETIME 1 char*
114TIFFTAG_DOCUMENTNAME 1 char*
115TIFFTAG_DOTRANGE 2 uint16
116TIFFTAG_EXTRASAMPLES 2 uint16,uint16* \(dg count & types array
117TIFFTAG_FAXFILLFUNC 1 TIFFFaxFillFunc G3/G4 compression pseudo-tag
118TIFFTAG_FAXMODE 1 int \(dg G3/G4 compression pseudo-tag
119TIFFTAG_FILLORDER 1 uint16 \(dg
120TIFFTAG_GROUP3OPTIONS 1 uint32 \(dg
121TIFFTAG_GROUP4OPTIONS 1 uint32 \(dg
122TIFFTAG_HALFTONEHINTS 2 uint16
123TIFFTAG_HOSTCOMPUTER 1 char*
124TIFFTAG_ICCPROFILE 2 uint32,void* count, profile data
125TIFFTAG_IMAGEDEPTH 1 uint32 \(dg
126TIFFTAG_IMAGEDESCRIPTION 1 char*
127TIFFTAG_IMAGELENGTH 1 uint32
128TIFFTAG_IMAGEWIDTH 1 uint32 \(dg
129TIFFTAG_INKNAMES 2 uint16, char*
130TIFFTAG_INKSET 1 uint16 \(dg
131TIFFTAG_JPEGCOLORMODE 1 int \(dg JPEG pseudo-tag
132TIFFTAG_JPEGQUALITY 1 int JPEG pseudo-tag
133TIFFTAG_JPEGTABLES 2 uint32*,void* \(dg count & tables
134TIFFTAG_JPEGTABLESMODE 1 int \(dg JPEG pseudo-tag
135TIFFTAG_MAKE 1 char*
136TIFFTAG_MATTEING 1 uint16 \(dg
137TIFFTAG_MAXSAMPLEVALUE 1 uint16
138TIFFTAG_MINSAMPLEVALUE 1 uint16
139TIFFTAG_MODEL 1 char*
140TIFFTAG_ORIENTATION 1 uint16
141TIFFTAG_PAGENAME 1 char*
142TIFFTAG_PAGENUMBER 2 uint16
143TIFFTAG_PHOTOMETRIC 1 uint16
144TIFFTAG_PHOTOSHOP ? uint32,void* count, data
145TIFFTAG_PLANARCONFIG 1 uint16 \(dg
146TIFFTAG_PREDICTOR 1 uint16 \(dg
147TIFFTAG_PRIMARYCHROMATICITIES 1 float* 6-entry array
80ed523f 148TIFFTAG_REFERENCEBLACKWHITE 1 float* \(dg 6-entry array
8414a40c
VZ
149TIFFTAG_RESOLUTIONUNIT 1 uint16
150TIFFTAG_RICHTIFFIPTC 2 uint32,void* count, data
151TIFFTAG_ROWSPERSTRIP 1 uint32 \(dg must be > 0
152TIFFTAG_SAMPLEFORMAT 1 uint16 \(dg
153TIFFTAG_SAMPLESPERPIXEL 1 uint16 \(dg value must be <= 4
154TIFFTAG_SMAXSAMPLEVALUE 1 double
155TIFFTAG_SMINSAMPLEVALUE 1 double
156TIFFTAG_SOFTWARE 1 char*
157TIFFTAG_STONITS 1 double \(dg
158TIFFTAG_SUBFILETYPE 1 uint32
159TIFFTAG_SUBIFD 2 uint16,uint32* count & offsets array
160TIFFTAG_TARGETPRINTER 1 char*
161TIFFTAG_THRESHHOLDING 1 uint16
162TIFFTAG_TILEDEPTH 1 uint32 \(dg
163TIFFTAG_TILELENGTH 1 uint32 \(dg must be a multiple of 8
164TIFFTAG_TILEWIDTH 1 uint32 \(dg must be a multiple of 8
165TIFFTAG_TRANSFERFUNCTION 1 or 3\(dd uint16* 1<<BitsPerSample entry arrays
166TIFFTAG_WHITEPOINT 1 float* 2-entry array
167TIFFTAG_XMLPACKET 2 uint32,void* count, data
168TIFFTAG_XPOSITION 1 float
169TIFFTAG_XRESOLUTION 1 float
170TIFFTAG_YCBCRCOEFFICIENTS 1 float* \(dg 3-entry array
171TIFFTAG_YCBCRPOSITIONING 1 uint16 \(dg
172TIFFTAG_YCBCRSAMPLING 2 uint16 \(dg
173TIFFTAG_YPOSITION 1 float
174TIFFTAG_YRESOLUTION 1 float
175.fi
176.sp 5p
177\(dg Tag may not have its values changed once data is written.
178.br
179.fi
180\(dd
181If
182.I SamplesPerPixel
183is one, then a single array is passed; otherwise three arrays should be
184passed.
185.fi
186* The contents of this field are quite complex. See
187.BR "The ICC Profile Format Specification" ,
188Annex B.3 "Embedding ICC Profiles in TIFF Files"
189(available at http://www.color.org) for an explanation.
190.br
191.SH "RETURN VALUES"
1921 is returned if the operation was successful.
193Otherwise, 0 is returned if an error was detected.
194.SH DIAGNOSTICS
195All error messages are directed to the
196.BR TIFFError (3TIFF)
197routine.
198.PP
199\fB%s: Cannot modify tag "%s" while writing\fP.
200Data has already been written to the file, so the
201specified tag's value can not be changed.
202This restriction is applied to all tags that affect
203the format of written data.
204.PP
205\fB%d: Bad value for "%s"\fP.
206An invalid value was supplied for the named tag.
207.SH "SEE ALSO"
208.BR TIFFOpen (3TIFF),
209.BR TIFFGetField (3TIFF),
210.BR TIFFSetDirectory (3TIFF),
211.BR TIFFWriteDirectory (3TIFF),
212.BR TIFFReadDirectory (3TIFF),
213.BR libtiff (3TIFF)
214.PP
215Libtiff library home page:
216.BR http://www.remotesensing.org/libtiff/