1
<!-- Creator : groff version 1.18.1 -->
2
<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
5
<meta name="generator" content="groff -Thtml, see www.gnu.org">
6
<meta name="Content-Style" content="text/css">
7
<title>TIFFSetField</title>
11
<h1 align=center>TIFFSetField</h1>
12
<a href="#NAME">NAME</a><br>
13
<a href="#SYNOPSIS">SYNOPSIS</a><br>
14
<a href="#DESCRIPTION">DESCRIPTION</a><br>
15
<a href="#RETURN VALUES">RETURN VALUES</a><br>
16
<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
17
<a href="#SEE ALSO">SEE ALSO</a><br>
23
<table width="100%" border=0 rules="none" frame="void"
24
cols="2" cellspacing="0" cellpadding="0">
25
<tr valign="top" align="left">
28
<p>TIFFSetField, TIFFVSetField − set the value(s) of a
29
tag in a <small>TIFF</small> file open for writing</p>
32
<a name="SYNOPSIS"></a>
35
<table width="100%" border=0 rules="none" frame="void"
36
cols="2" cellspacing="0" cellpadding="0">
37
<tr valign="top" align="left">
40
<p><b>#include <tiffio.h></b></p>
42
<p><b>int TIFFSetField(TIFF *</b><i>tif</i><b>, ttag_t</b>
43
<i>tag</i><b>,</b> <i>...</i><b>)</b></p>
45
<p><b>#include <stdarg.h></b></p>
47
<p><b>int TIFFVSetField(TIFF *</b><i>tif</i><b>, ttag_t</b>
48
<i>tag</i><b>, va_list</b> <i>ap</i><b>)</b></p>
51
<a name="DESCRIPTION"></a>
54
<table width="100%" border=0 rules="none" frame="void"
55
cols="2" cellspacing="0" cellpadding="0">
56
<tr valign="top" align="left">
59
<p><i>TIFFSetField</i> sets the value of a field or
60
pseudo-tag in the current directory associated with the open
61
<small>TIFF</small> file <i>tif</i>. (A <i>pseudo-tag</i> is
62
a parameter that is used to control the operation of the
63
<small>TIFF</small> library but whose value is not read or
64
written to the underlying file.) To set the value of a field
65
the file must have been previously opened for writing with
66
<i>TIFFOpen</i>(3TIFF); pseudo-tags can be set whether the
67
file was opened for reading or writing. The field is
68
identified by <i>tag</i>, one of the values defined in the
69
include file <b>tiff.h</b> (see also the table below). The
70
actual value is specified using a variable argument list, as
71
prescribed by the <i>stdarg</i>(3) interface (or, on some
72
machines, the <i>varargs</i>(3) interface.)</p>
74
<p><i>TIFFVSetField</i> is functionally equivalent to
75
<i>TIFFSetField</i> except that it takes a pointer to a
76
variable argument list. <i>TIFFVSetField</i> is useful for
77
writing routines that are layered on top of the
78
functionality provided by <i>TIFFSetField</i>.</p>
80
<p>The tags understood by <i>libtiff</i>, the number of
81
parameter values, and the expected types for the parameter
82
values are shown below. The data types are: <i>char*</i> is
83
null-terminated string and corresponds to the
84
<small>ASCII</small> data type; <i>uint16</i> is an unsigned
85
16-bit value; <i>uint32</i> is an unsigned 32-bit value;
86
<i>uint16*</i> is an array of unsigned 16-bit values.
87
<i>void*</i> is an array of data values of unspecified
90
<p>Consult the <small>TIFF</small> specification for
91
information on the meaning of each tag.</p></td>
95
<p><i>Tag Name Count Types Notes</i></p>
97
<table width="100%" border=0 rules="none" frame="void"
98
cols="5" cellspacing="0" cellpadding="0">
99
<tr valign="top" align="left">
103
<p>TIFFTAG_ARTIST</p>
115
<tr valign="top" align="left">
119
<p>TIFFTAG_BADFAXLINES</p>
131
<tr valign="top" align="left">
135
<p>TIFFTAG_BITSPERSAMPLE</p>
149
<tr valign="top" align="left">
153
<p>TIFFTAG_CLEANFAXDATA</p>
165
<tr valign="top" align="left">
169
<p>TIFFTAG_COLORMAP</p>
181
<p>1<<BitsPerSample arrays</p>
183
<tr valign="top" align="left">
187
<p>TIFFTAG_COMPRESSION</p>
201
<tr valign="top" align="left">
205
<p>TIFFTAG_CONSECUTIVEBADFAXLINES</p>
217
<tr valign="top" align="left">
221
<p>TIFFTAG_COPYRIGHT</p>
233
<tr valign="top" align="left">
237
<p>TIFFTAG_DATETIME</p>
249
<tr valign="top" align="left">
253
<p>TIFFTAG_DOCUMENTNAME</p>
265
<tr valign="top" align="left">
269
<p>TIFFTAG_DOTRANGE</p>
281
<tr valign="top" align="left">
285
<p>TIFFTAG_EXTRASAMPLES</p>
293
<p>uint16,uint16*</p>
297
<p>† count & types array</p>
299
<tr valign="top" align="left">
303
<p>TIFFTAG_FAXFILLFUNC</p>
311
<p>TIFFFaxFillFunc</p>
315
<p>G3/G4 compression pseudo-tag</p>
317
<tr valign="top" align="left">
321
<p>TIFFTAG_FAXMODE</p>
333
<p>† G3/G4 compression pseudo-tag</p>
335
<tr valign="top" align="left">
339
<p>TIFFTAG_FILLORDER</p>
353
<tr valign="top" align="left">
357
<p>TIFFTAG_GROUP3OPTIONS</p>
371
<tr valign="top" align="left">
375
<p>TIFFTAG_GROUP4OPTIONS</p>
389
<tr valign="top" align="left">
393
<p>TIFFTAG_HALFTONEHINTS</p>
405
<tr valign="top" align="left">
409
<p>TIFFTAG_HOSTCOMPUTER</p>
421
<tr valign="top" align="left">
425
<p>TIFFTAG_ICCPROFILE</p>
437
<p>count, profile data</p>
439
<tr valign="top" align="left">
443
<p>TIFFTAG_IMAGEDEPTH</p>
457
<tr valign="top" align="left">
461
<p>TIFFTAG_IMAGEDESCRIPTION</p>
473
<tr valign="top" align="left">
477
<p>TIFFTAG_IMAGELENGTH</p>
489
<tr valign="top" align="left">
493
<p>TIFFTAG_IMAGEWIDTH</p>
507
<tr valign="top" align="left">
511
<p>TIFFTAG_INKNAMES</p>
523
<tr valign="top" align="left">
527
<p>TIFFTAG_INKSET</p>
541
<tr valign="top" align="left">
545
<p>TIFFTAG_JPEGCOLORMODE</p>
557
<p>† JPEG pseudo-tag</p>
559
<tr valign="top" align="left">
563
<p>TIFFTAG_JPEGQUALITY</p>
575
<p>JPEG pseudo-tag</p>
577
<tr valign="top" align="left">
581
<p>TIFFTAG_JPEGTABLES</p>
593
<p>† count & tables</p>
595
<tr valign="top" align="left">
599
<p>TIFFTAG_JPEGTABLESMODE</p>
611
<p>† JPEG pseudo-tag</p>
613
<tr valign="top" align="left">
629
<tr valign="top" align="left">
633
<p>TIFFTAG_MATTEING</p>
647
<tr valign="top" align="left">
651
<p>TIFFTAG_MAXSAMPLEVALUE</p>
663
<tr valign="top" align="left">
667
<p>TIFFTAG_MINSAMPLEVALUE</p>
679
<tr valign="top" align="left">
695
<tr valign="top" align="left">
699
<p>TIFFTAG_ORIENTATION</p>
711
<tr valign="top" align="left">
715
<p>TIFFTAG_PAGENAME</p>
727
<tr valign="top" align="left">
731
<p>TIFFTAG_PAGENUMBER</p>
743
<tr valign="top" align="left">
747
<p>TIFFTAG_PHOTOMETRIC</p>
759
<tr valign="top" align="left">
763
<p>TIFFTAG_PHOTOSHOP</p>
777
<tr valign="top" align="left">
781
<p>TIFFTAG_PLANARCONFIG</p>
795
<tr valign="top" align="left">
799
<p>TIFFTAG_PREDICTOR</p>
813
<tr valign="top" align="left">
817
<p>TIFFTAG_PRIMARYCHROMATICITIES</p>
831
<tr valign="top" align="left">
835
<p>TIFFTAG_REFERENCEBLACKWHITE</p>
847
<p>† 2*SamplesPerPixel array</p>
849
<tr valign="top" align="left">
853
<p>TIFFTAG_RESOLUTIONUNIT</p>
865
<tr valign="top" align="left">
869
<p>TIFFTAG_RICHTIFFIPTC</p>
883
<tr valign="top" align="left">
887
<p>TIFFTAG_ROWSPERSTRIP</p>
899
<p>† must be > 0</p>
901
<tr valign="top" align="left">
905
<p>TIFFTAG_SAMPLEFORMAT</p>
919
<tr valign="top" align="left">
923
<p>TIFFTAG_SAMPLESPERPIXEL</p>
935
<p>† value must be <= 4</p>
937
<tr valign="top" align="left">
941
<p>TIFFTAG_SMAXSAMPLEVALUE</p>
953
<tr valign="top" align="left">
957
<p>TIFFTAG_SMINSAMPLEVALUE</p>
969
<tr valign="top" align="left">
973
<p>TIFFTAG_SOFTWARE</p>
985
<tr valign="top" align="left">
989
<p>TIFFTAG_STONITS</p>
1003
<tr valign="top" align="left">
1004
<td width="8%"></td>
1007
<p>TIFFTAG_SUBFILETYPE</p>
1019
<tr valign="top" align="left">
1020
<td width="8%"></td>
1023
<p>TIFFTAG_SUBIFD</p>
1031
<p>uint16,uint32*</p>
1035
<p>count & offsets array</p>
1037
<tr valign="top" align="left">
1038
<td width="8%"></td>
1041
<p>TIFFTAG_TARGETPRINTER</p>
1053
<tr valign="top" align="left">
1054
<td width="8%"></td>
1057
<p>TIFFTAG_THRESHHOLDING</p>
1069
<tr valign="top" align="left">
1070
<td width="8%"></td>
1073
<p>TIFFTAG_TILEDEPTH</p>
1087
<tr valign="top" align="left">
1088
<td width="8%"></td>
1091
<p>TIFFTAG_TILELENGTH</p>
1103
<p>† must be a multiple of 8</p>
1105
<tr valign="top" align="left">
1106
<td width="8%"></td>
1109
<p>TIFFTAG_TILEWIDTH</p>
1121
<p>† must be a multiple of 8</p>
1123
<tr valign="top" align="left">
1124
<td width="8%"></td>
1127
<p>TIFFTAG_TRANSFERFUNCTION</p>
1131
<p>1 or 3‡ uint16*</p>
1133
<td width="24%"></td>
1136
<p>1<<BitsPerSample entry arrays</p>
1138
<tr valign="top" align="left">
1139
<td width="8%"></td>
1142
<p>TIFFTAG_WHITEPOINT</p>
1154
<p>2-entry array</p>
1156
<tr valign="top" align="left">
1157
<td width="8%"></td>
1160
<p>TIFFTAG_XMLPACKET</p>
1174
<tr valign="top" align="left">
1175
<td width="8%"></td>
1178
<p>TIFFTAG_XPOSITION</p>
1190
<tr valign="top" align="left">
1191
<td width="8%"></td>
1194
<p>TIFFTAG_XRESOLUTION</p>
1206
<tr valign="top" align="left">
1207
<td width="8%"></td>
1210
<p>TIFFTAG_YCBCRCOEFFICIENTS</p>
1222
<p>† 3-entry array</p>
1224
<tr valign="top" align="left">
1225
<td width="8%"></td>
1228
<p>TIFFTAG_YCBCRPOSITIONING</p>
1242
<tr valign="top" align="left">
1243
<td width="8%"></td>
1246
<p>TIFFTAG_YCBCRSAMPLING</p>
1260
<tr valign="top" align="left">
1261
<td width="8%"></td>
1264
<p>TIFFTAG_YPOSITION</p>
1276
<tr valign="top" align="left">
1277
<td width="8%"></td>
1280
<p>TIFFTAG_YRESOLUTION</p>
1293
<!-- INDENTATION -->
1294
<table width="100%" border=0 rules="none" frame="void"
1295
cols="2" cellspacing="0" cellpadding="0">
1296
<tr valign="top" align="left">
1297
<td width="8%"></td>
1299
<p>† Tag may not have its values changed once data is
1301
‡ If <i>SamplesPerPixel</i> is one, then a single
1302
array is passed; otherwise three arrays should be
1304
* The contents of this field are quite complex. See <b>The
1305
ICC Profile Format Specification</b>, Annex B.3
1306
"Embedding ICC Profiles in TIFF Files" (available
1307
at http://www.color.org) for an explanation.</p>
1310
<a name="RETURN VALUES"></a>
1311
<h2>RETURN VALUES</h2>
1312
<!-- INDENTATION -->
1313
<table width="100%" border=0 rules="none" frame="void"
1314
cols="2" cellspacing="0" cellpadding="0">
1315
<tr valign="top" align="left">
1316
<td width="8%"></td>
1318
<p>1 is returned if the operation was successful. Otherwise,
1319
0 is returned if an error was detected.</p>
1322
<a name="DIAGNOSTICS"></a>
1323
<h2>DIAGNOSTICS</h2>
1324
<!-- INDENTATION -->
1325
<table width="100%" border=0 rules="none" frame="void"
1326
cols="2" cellspacing="0" cellpadding="0">
1327
<tr valign="top" align="left">
1328
<td width="8%"></td>
1330
<p>All error messages are directed to the
1331
<b>TIFFError</b>(3TIFF) routine.</p>
1332
<!-- INDENTATION -->
1333
<p><b>%s: Cannot modify tag "%s" while
1334
writing</b>. Data has already been written to the file, so
1335
the specified tag’s value can not be changed. This
1336
restriction is applied to all tags that affect the format of
1338
<!-- INDENTATION -->
1339
<p><b>%d: Bad value for "%s"</b>. An invalid value
1340
was supplied for the named tag.</p>
1343
<a name="SEE ALSO"></a>
1345
<!-- INDENTATION -->
1346
<table width="100%" border=0 rules="none" frame="void"
1347
cols="2" cellspacing="0" cellpadding="0">
1348
<tr valign="top" align="left">
1349
<td width="8%"></td>
1351
<p><b>TIFFOpen</b>(3TIFF), <b>TIFFGetField</b>(3TIFF),
1352
<b>TIFFSetDirectory</b>(3TIFF),
1353
<b>TIFFWriteDirectory</b>(3TIFF),
1354
<b>TIFFReadDirectory</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
1355
<!-- INDENTATION -->
1356
<p>Libtiff library home page:
1357
<b>http://www.remotesensing.org/libtiff/</b></p>