|
kusano |
7d535a |
.\" $Id: TIFFSetField.3tiff,v 1.5 2010-05-06 02:54:46 olivier Exp $
|
|
kusano |
7d535a |
.\"
|
|
kusano |
7d535a |
.\" Copyright (c) 1988-1997 Sam Leffler
|
|
kusano |
7d535a |
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
|
kusano |
7d535a |
.\"
|
|
kusano |
7d535a |
.\" Permission to use, copy, modify, distribute, and sell this software and
|
|
kusano |
7d535a |
.\" its documentation for any purpose is hereby granted without fee, provided
|
|
kusano |
7d535a |
.\" that (i) the above copyright notices and this permission notice appear in
|
|
kusano |
7d535a |
.\" all copies of the software and related documentation, and (ii) the names of
|
|
kusano |
7d535a |
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
|
|
kusano |
7d535a |
.\" publicity relating to the software without the specific, prior written
|
|
kusano |
7d535a |
.\" permission of Sam Leffler and Silicon Graphics.
|
|
kusano |
7d535a |
.\"
|
|
kusano |
7d535a |
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
kusano |
7d535a |
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
kusano |
7d535a |
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
kusano |
7d535a |
.\"
|
|
kusano |
7d535a |
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
|
kusano |
7d535a |
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
|
kusano |
7d535a |
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
kusano |
7d535a |
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
|
kusano |
7d535a |
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
kusano |
7d535a |
.\" OF THIS SOFTWARE.
|
|
kusano |
7d535a |
.\"
|
|
kusano |
7d535a |
.if n .po 0
|
|
kusano |
7d535a |
.TH TIFFSetField 3TIFF "October 29, 2004" "libtiff"
|
|
kusano |
7d535a |
.SH NAME
|
|
kusano |
7d535a |
TIFFSetField, TIFFVSetField \- set the value(s) of a tag in a
|
|
kusano |
7d535a |
.SM TIFF
|
|
kusano |
7d535a |
file open for writing
|
|
kusano |
7d535a |
.SH SYNOPSIS
|
|
kusano |
7d535a |
.B "#include <tiffio.h>"</tiffio.h>
|
|
kusano |
7d535a |
.sp
|
|
kusano |
7d535a |
.BI "int TIFFSetField(TIFF *" tif ", ttag_t " tag ", " ... ")"
|
|
kusano |
7d535a |
.sp
|
|
kusano |
7d535a |
.B "#include <stdarg.h>"</stdarg.h>
|
|
kusano |
7d535a |
.sp
|
|
kusano |
7d535a |
.BI "int TIFFVSetField(TIFF *" tif ", ttag_t " tag ", va_list " ap ")"
|
|
kusano |
7d535a |
.SH DESCRIPTION
|
|
kusano |
7d535a |
.IR TIFFSetField
|
|
kusano |
7d535a |
sets the value of a field
|
|
kusano |
7d535a |
or pseudo-tag in the current directory associated with
|
|
kusano |
7d535a |
the open
|
|
kusano |
7d535a |
.SM TIFF
|
|
kusano |
7d535a |
file
|
|
kusano |
7d535a |
.IR tif .
|
|
kusano |
7d535a |
(A
|
|
kusano |
7d535a |
.I pseudo-tag
|
|
kusano |
7d535a |
is a parameter that is used to control the operation of the
|
|
kusano |
7d535a |
.SM TIFF
|
|
kusano |
7d535a |
library but whose value is not read or written to the underlying file.)
|
|
kusano |
7d535a |
To set the value of a field
|
|
kusano |
7d535a |
the file must have been previously opened for writing with
|
|
kusano |
7d535a |
.IR TIFFOpen (3TIFF);
|
|
kusano |
7d535a |
pseudo-tags can be set whether the file was opened for reading
|
|
kusano |
7d535a |
or writing.
|
|
kusano |
7d535a |
The field is identified by
|
|
kusano |
7d535a |
.IR tag ,
|
|
kusano |
7d535a |
one of the values defined in the include file
|
|
kusano |
7d535a |
.B tiff.h
|
|
kusano |
7d535a |
(see also the table below).
|
|
kusano |
7d535a |
The actual value is specified using a variable argument list,
|
|
kusano |
7d535a |
as prescribed by the
|
|
kusano |
7d535a |
.IR stdarg (3)
|
|
kusano |
7d535a |
interface (\c
|
|
kusano |
7d535a |
or, on some machines, the
|
|
kusano |
7d535a |
.IR varargs (3)
|
|
kusano |
7d535a |
interface.)
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.IR TIFFVSetField
|
|
kusano |
7d535a |
is functionally equivalent to
|
|
kusano |
7d535a |
.IR TIFFSetField
|
|
kusano |
7d535a |
except that it takes a pointer to a variable
|
|
kusano |
7d535a |
argument list.
|
|
kusano |
7d535a |
.I TIFFVSetField
|
|
kusano |
7d535a |
is useful for writing routines that are layered
|
|
kusano |
7d535a |
on top of the functionality provided by
|
|
kusano |
7d535a |
.IR TIFFSetField .
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
The tags understood by
|
|
kusano |
7d535a |
.IR libtiff ,
|
|
kusano |
7d535a |
the number of parameter values, and the
|
|
kusano |
7d535a |
expected types for the parameter values are shown below.
|
|
kusano |
7d535a |
The data types are:
|
|
kusano |
7d535a |
.I char*
|
|
kusano |
7d535a |
is null-terminated string and corresponds to the
|
|
kusano |
7d535a |
.SM ASCII
|
|
kusano |
7d535a |
data type;
|
|
kusano |
7d535a |
.I uint16
|
|
kusano |
7d535a |
is an unsigned 16-bit value;
|
|
kusano |
7d535a |
.I uint32
|
|
kusano |
7d535a |
is an unsigned 32-bit value;
|
|
kusano |
7d535a |
.I uint16*
|
|
kusano |
7d535a |
is an array of unsigned 16-bit values.
|
|
kusano |
7d535a |
.I void*
|
|
kusano |
7d535a |
is an array of data values of unspecified type.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Consult the
|
|
kusano |
7d535a |
.SM TIFF
|
|
kusano |
7d535a |
specification for information on the meaning of each tag.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.nf
|
|
kusano |
7d535a |
.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc \(dg'u+2n
|
|
kusano |
7d535a |
\fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP
|
|
kusano |
7d535a |
.sp 5p
|
|
kusano |
7d535a |
TIFFTAG_ARTIST 1 char*
|
|
kusano |
7d535a |
TIFFTAG_BADFAXLINES 1 uint32
|
|
kusano |
7d535a |
TIFFTAG_BITSPERSAMPLE 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_CLEANFAXDATA 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_COLORMAP 3 uint16* 1<
|
|
kusano |
7d535a |
TIFFTAG_COMPRESSION 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_CONSECUTIVEBADFAXLINES 1 uint32
|
|
kusano |
7d535a |
TIFFTAG_COPYRIGHT 1 char*
|
|
kusano |
7d535a |
TIFFTAG_DATETIME 1 char*
|
|
kusano |
7d535a |
TIFFTAG_DOCUMENTNAME 1 char*
|
|
kusano |
7d535a |
TIFFTAG_DOTRANGE 2 uint16
|
|
kusano |
7d535a |
TIFFTAG_EXTRASAMPLES 2 uint16,uint16* \(dg count & types array
|
|
kusano |
7d535a |
TIFFTAG_FAXFILLFUNC 1 TIFFFaxFillFunc G3/G4 compression pseudo-tag
|
|
kusano |
7d535a |
TIFFTAG_FAXMODE 1 int \(dg G3/G4 compression pseudo-tag
|
|
kusano |
7d535a |
TIFFTAG_FILLORDER 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_GROUP3OPTIONS 1 uint32 \(dg
|
|
kusano |
7d535a |
TIFFTAG_GROUP4OPTIONS 1 uint32 \(dg
|
|
kusano |
7d535a |
TIFFTAG_HALFTONEHINTS 2 uint16
|
|
kusano |
7d535a |
TIFFTAG_HOSTCOMPUTER 1 char*
|
|
kusano |
7d535a |
TIFFTAG_ICCPROFILE 2 uint32,void* count, profile data
|
|
kusano |
7d535a |
TIFFTAG_IMAGEDEPTH 1 uint32 \(dg
|
|
kusano |
7d535a |
TIFFTAG_IMAGEDESCRIPTION 1 char*
|
|
kusano |
7d535a |
TIFFTAG_IMAGELENGTH 1 uint32
|
|
kusano |
7d535a |
TIFFTAG_IMAGEWIDTH 1 uint32 \(dg
|
|
kusano |
7d535a |
TIFFTAG_INKNAMES 2 uint16, char*
|
|
kusano |
7d535a |
TIFFTAG_INKSET 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_JPEGCOLORMODE 1 int \(dg JPEG pseudo-tag
|
|
kusano |
7d535a |
TIFFTAG_JPEGQUALITY 1 int JPEG pseudo-tag
|
|
kusano |
7d535a |
TIFFTAG_JPEGTABLES 2 uint32*,void* \(dg count & tables
|
|
kusano |
7d535a |
TIFFTAG_JPEGTABLESMODE 1 int \(dg JPEG pseudo-tag
|
|
kusano |
7d535a |
TIFFTAG_MAKE 1 char*
|
|
kusano |
7d535a |
TIFFTAG_MATTEING 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_MAXSAMPLEVALUE 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_MINSAMPLEVALUE 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_MODEL 1 char*
|
|
kusano |
7d535a |
TIFFTAG_ORIENTATION 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_PAGENAME 1 char*
|
|
kusano |
7d535a |
TIFFTAG_PAGENUMBER 2 uint16
|
|
kusano |
7d535a |
TIFFTAG_PHOTOMETRIC 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_PHOTOSHOP ? uint32,void* count, data
|
|
kusano |
7d535a |
TIFFTAG_PLANARCONFIG 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_PREDICTOR 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_PRIMARYCHROMATICITIES 1 float* 6-entry array
|
|
kusano |
7d535a |
TIFFTAG_REFERENCEBLACKWHITE 1 float* \(dg 6-entry array
|
|
kusano |
7d535a |
TIFFTAG_RESOLUTIONUNIT 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_RICHTIFFIPTC 2 uint32,void* count, data
|
|
kusano |
7d535a |
TIFFTAG_ROWSPERSTRIP 1 uint32 \(dg must be > 0
|
|
kusano |
7d535a |
TIFFTAG_SAMPLEFORMAT 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_SAMPLESPERPIXEL 1 uint16 \(dg value must be <= 4
|
|
kusano |
7d535a |
TIFFTAG_SMAXSAMPLEVALUE 1 double
|
|
kusano |
7d535a |
TIFFTAG_SMINSAMPLEVALUE 1 double
|
|
kusano |
7d535a |
TIFFTAG_SOFTWARE 1 char*
|
|
kusano |
7d535a |
TIFFTAG_STONITS 1 double \(dg
|
|
kusano |
7d535a |
TIFFTAG_SUBFILETYPE 1 uint32
|
|
kusano |
7d535a |
TIFFTAG_SUBIFD 2 uint16,uint32* count & offsets array
|
|
kusano |
7d535a |
TIFFTAG_TARGETPRINTER 1 char*
|
|
kusano |
7d535a |
TIFFTAG_THRESHHOLDING 1 uint16
|
|
kusano |
7d535a |
TIFFTAG_TILEDEPTH 1 uint32 \(dg
|
|
kusano |
7d535a |
TIFFTAG_TILELENGTH 1 uint32 \(dg must be a multiple of 8
|
|
kusano |
7d535a |
TIFFTAG_TILEWIDTH 1 uint32 \(dg must be a multiple of 8
|
|
kusano |
7d535a |
TIFFTAG_TRANSFERFUNCTION 1 or 3\(dd uint16* 1<
|
|
kusano |
7d535a |
TIFFTAG_WHITEPOINT 1 float* 2-entry array
|
|
kusano |
7d535a |
TIFFTAG_XMLPACKET 2 uint32,void* count, data
|
|
kusano |
7d535a |
TIFFTAG_XPOSITION 1 float
|
|
kusano |
7d535a |
TIFFTAG_XRESOLUTION 1 float
|
|
kusano |
7d535a |
TIFFTAG_YCBCRCOEFFICIENTS 1 float* \(dg 3-entry array
|
|
kusano |
7d535a |
TIFFTAG_YCBCRPOSITIONING 1 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_YCBCRSAMPLING 2 uint16 \(dg
|
|
kusano |
7d535a |
TIFFTAG_YPOSITION 1 float
|
|
kusano |
7d535a |
TIFFTAG_YRESOLUTION 1 float
|
|
kusano |
7d535a |
.fi
|
|
kusano |
7d535a |
.sp 5p
|
|
kusano |
7d535a |
\(dg Tag may not have its values changed once data is written.
|
|
kusano |
7d535a |
.br
|
|
kusano |
7d535a |
.fi
|
|
kusano |
7d535a |
\(dd
|
|
kusano |
7d535a |
If
|
|
kusano |
7d535a |
.I SamplesPerPixel
|
|
kusano |
7d535a |
is one, then a single array is passed; otherwise three arrays should be
|
|
kusano |
7d535a |
passed.
|
|
kusano |
7d535a |
.fi
|
|
kusano |
7d535a |
* The contents of this field are quite complex. See
|
|
kusano |
7d535a |
.BR "The ICC Profile Format Specification" ,
|
|
kusano |
7d535a |
Annex B.3 "Embedding ICC Profiles in TIFF Files"
|
|
kusano |
7d535a |
(available at http://www.color.org) for an explanation.
|
|
kusano |
7d535a |
.br
|
|
kusano |
7d535a |
.SH "RETURN VALUES"
|
|
kusano |
7d535a |
1 is returned if the operation was successful.
|
|
kusano |
7d535a |
Otherwise, 0 is returned if an error was detected.
|
|
kusano |
7d535a |
.SH DIAGNOSTICS
|
|
kusano |
7d535a |
All error messages are directed to the
|
|
kusano |
7d535a |
.BR TIFFError (3TIFF)
|
|
kusano |
7d535a |
routine.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
\fB%s: Cannot modify tag "%s" while writing\fP.
|
|
kusano |
7d535a |
Data has already been written to the file, so the
|
|
kusano |
7d535a |
specified tag's value can not be changed.
|
|
kusano |
7d535a |
This restriction is applied to all tags that affect
|
|
kusano |
7d535a |
the format of written data.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
\fB%d: Bad value for "%s"\fP.
|
|
kusano |
7d535a |
An invalid value was supplied for the named tag.
|
|
kusano |
7d535a |
.SH "SEE ALSO"
|
|
kusano |
7d535a |
.BR TIFFOpen (3TIFF),
|
|
kusano |
7d535a |
.BR TIFFGetField (3TIFF),
|
|
kusano |
7d535a |
.BR TIFFSetDirectory (3TIFF),
|
|
kusano |
7d535a |
.BR TIFFWriteDirectory (3TIFF),
|
|
kusano |
7d535a |
.BR TIFFReadDirectory (3TIFF),
|
|
kusano |
7d535a |
.BR libtiff (3TIFF)
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
Libtiff library home page:
|
|
kusano |
7d535a |
.BR http://www.remotesensing.org/libtiff/
|