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