📄 tiffsetfield.3t
字号:
.\" $Header: /cvsroot/osrs/libtiff/man/TIFFSetField.3t,v 1.5 2002/10/02 08:47:29 dron Exp $.\".\" Copyright (c) 1988-1997 Sam Leffler.\" Copyright (c) 1991-1997 Silicon Graphics, Inc..\".\" Permission to use, copy, modify, distribute, and sell this software and .\" its documentation for any purpose is hereby granted without fee, provided.\" that (i) the above copyright notices and this permission notice appear in.\" all copies of the software and related documentation, and (ii) the names of.\" Sam Leffler and Silicon Graphics may not be used in any advertising or.\" publicity relating to the software without the specific, prior written.\" permission of Sam Leffler and Silicon Graphics..\" .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. .\" .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE .\" OF THIS SOFTWARE..\".if n .po 0.TH TIFFSetField 3T "August 28, 1997".SH NAMETIFFSetField \- set the value(s) of a tag in a.SM TIFFfile open for writing.SH SYNOPSIS.B "#include <tiffio.h>".br.B "int TIFFSetField(TIFF* tif, ttag_t tag, ...)".br.B "#include <stdarg.h>".br.B "int TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)".SH DESCRIPTION.IR TIFFSetFieldsets the value of a fieldor pseudo-tag in the current directory associated withthe open.SM TIFFfile.IR tif .(A.I pseudo-tag is a parameter that is used to control the operation of the.SM TIFFlibrary but whose value is not read or written to the underlying file.)To set the value of a fieldthe file must have been previously opened for writing with.IR TIFFOpen (3T);pseudo-tags can be set whether the file was opened for readingor writing.The field is identified by.IR tag ,one of the values defined in the include file.B tiff.h(see also the table below).The actual value is specified using a variable argument list,as prescribed by the.IR stdarg (3)interface (\cor, on some machines, the.IR varargs (3)interface.).PP.IR TIFFVSetFieldis functionally equivalent to.IR TIFFSetFieldexcept that it takes a pointer to a variableargument list..I TIFFVSetFieldis useful for writing routines that are layeredon top of the functionality provided by.IR TIFFSetField ..PPThe tags understood by.IR libtiff ,the number of parameter values, and theexpected types for the parameter values are shown below.The data types are:.I char*is null-terminated string and corresponds to the.SM ASCIIdata type;.I uint16is an unsigned 16-bit value;.I uint32is an unsigned 32-bit value;.I uint16*is an array of unsigned 16-bit values..I void*is an array of data values of unspecified type.Consult the.SM TIFFspecification for information on the meaning of each tag..PP.nf.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc \(dg'u+2n\fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP.sp 5pTIFFTAG_ARTIST 1 char*TIFFTAG_BADFAXLINES 1 uint32TIFFTAG_BITSPERSAMPLE 1 uint16 \(dgTIFFTAG_CLEANFAXDATA 1 uint16TIFFTAG_COLORMAP 3 uint16* 1<<BitsPerSample arraysTIFFTAG_COMPRESSION 1 uint16 \(dgTIFFTAG_CONSECUTIVEBADFAXLINES 1 uint32TIFFTAG_COPYRIGHT 1 char*TIFFTAG_DATETIME 1 char*TIFFTAG_DOCUMENTNAME 1 char*TIFFTAG_DOTRANGE 2 uint16TIFFTAG_EXTRASAMPLES 2 uint16,uint16* \(dg count & types arrayTIFFTAG_FAXMODE 1 int \(dg G3/G4 compression pseudo-tagTIFFTAG_FAXFILLFUNC 1 TIFFFaxFillFunc G3/G4 compression pseudo-tagTIFFTAG_FILLORDER 1 uint16 \(dgTIFFTAG_GROUP3OPTIONS 1 uint32 \(dgTIFFTAG_GROUP4OPTIONS 1 uint32 \(dgTIFFTAG_HALFTONEHINTS 2 uint16TIFFTAG_HOSTCOMPUTER 1 char*TIFFTAG_IMAGEDESCRIPTION 1 char*TIFFTAG_IMAGEDEPTH 1 uint32 \(dgTIFFTAG_IMAGELENGTH 1 uint32TIFFTAG_IMAGEWIDTH 1 uint32 \(dgTIFFTAG_INKNAMES 1 char*TIFFTAG_INKSET 1 uint16 \(dgTIFFTAG_JPEGTABLES 2 uint32*,void* \(dg count & tablesTIFFTAG_JPEGQUALITY 1 int JPEG pseudo-tagTIFFTAG_JPEGCOLORMODE 1 int \(dg JPEG pseudo-tagTIFFTAG_JPEGTABLESMODE 1 int \(dg JPEG pseudo-tagTIFFTAG_MAKE 1 char*TIFFTAG_MATTEING 1 uint16 \(dgTIFFTAG_MAXSAMPLEVALUE 1 uint16TIFFTAG_MINSAMPLEVALUE 1 uint16TIFFTAG_MODEL 1 char*TIFFTAG_ORIENTATION 1 uint16TIFFTAG_PAGENAME 1 char*TIFFTAG_PAGENUMBER 2 uint16TIFFTAG_PHOTOMETRIC 1 uint16TIFFTAG_PLANARCONFIG 1 uint16 \(dgTIFFTAG_PREDICTOR 1 uint16 \(dgTIFFTAG_PRIMARYCHROMATICITIES 1 float* 6-entry arrayTIFFTAG_REFERENCEBLACKWHITE 1 float* \(dg 2*SamplesPerPixel arrayTIFFTAG_RESOLUTIONUNIT 1 uint16TIFFTAG_ROWSPERSTRIP 1 uint32 \(dg must be > 0TIFFTAG_SAMPLEFORMAT 1 uint16 \(dgTIFFTAG_SAMPLESPERPIXEL 1 uint16 \(dg value must be <= 4TIFFTAG_SMAXSAMPLEVALUE 1 doubleTIFFTAG_SMINSAMPLEVALUE 1 doubleTIFFTAG_SOFTWARE 1 char*TIFFTAG_STONITS 1 double \(dgTIFFTAG_SUBFILETYPE 1 uint32TIFFTAG_SUBIFD 2 uint16,uint32* count & offsets arrayTIFFTAG_TARGETPRINTER 1 char*TIFFTAG_THRESHHOLDING 1 uint16TIFFTAG_TILEDEPTH 1 uint32 \(dgTIFFTAG_TILELENGTH 1 uint32 \(dg must be a multiple of 8TIFFTAG_TILEWIDTH 1 uint32 \(dg must be a multiple of 8TIFFTAG_TRANSFERFUNCTION 1 or 3\(dd uint16* 1<<BitsPerSample entry arraysTIFFTAG_XPOSITION 1 floatTIFFTAG_XRESOLUTION 1 floatTIFFTAG_WHITEPOINT 1 float* 2-entry arrayTIFFTAG_YCBCRCOEFFICIENTS 1 float* \(dg 3-entry arrayTIFFTAG_YCBCRPOSITIONING 1 uint16 \(dgTIFFTAG_YCBCRSAMPLING 2 uint16 \(dgTIFFTAG_YPOSITION 1 floatTIFFTAG_YRESOLUTION 1 floatTIFFTAG_ICCPROFILE 2 uint32,void* count, profile data*.fi.sp 5p\(dg Tag may not have its values changed once data is written..br.fi\(ddIf.I SamplesPerPixelis one, then a single array is passed; otherwise three arrays should bepassed..fi* The contents of this field are quite complex. See .IR "The ICC Profile Format Specification" ,Annex B.3 "Embedding ICC Profiles in TIFF Files"(available at http://www.color.org) for an explanation..br.SH "RETURN VALUES"1 is returned if the tag is defined in the currentdirectory; otherwise a 0 is returned..SH "RETURN VALUES"1 is returned if the operation was successful.Otherwise, 0 is returned if an error was detected..SH DIAGNOSTICSAll error messages are directed to the.IR TIFFError (3T)routine..PP\fB%s: Cannot modify tag "%s" while writing\fP.Data has already been written to the file, so thespecified tag's value can not be changed.This restriction is applied to all tags that affectthe format of written data..PP\fB%d: Bad value for "%s"\fP.An invalid value was supplied for the named tag..SH "SEE ALSO".IR libtiff (3T),.IR TIFFOpen (3T),.IR TIFFGetField (3T),.IR TIFFSetDirectory (3T),.IR TIFFWriteDirectory (3T),.IR TIFFReadDirectory (3T)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -