📄 libtiff.3t
字号:
.\" $Header: /cvsroot/osrs/libtiff/man/libtiff.3t,v 1.8 2003/12/21 22:04:53 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 INTRO 3T "August 21, 1997".SH NAMElibtiff \- introduction to.IR libtiff ,a library for reading and writing.SM TIFFfiles.SH SYNOPSIS.B "#include <tiffio.h>".brcc file.c.B -ltiff.SH DESCRIPTION.I libtiffis a library for reading and writing data files encoded with the.I "Tag Image File"format, Revision 6.0 (or revision 5.0 or revision 4.0).This file format is suitable for archiving multi-color andmonochromatic image data..PPThe library supports several compression algorithms, as indicatedby the.I Compressionfield, including:no compression (1),.SM CCITT1D Huffman compression (2),.SM CCITTGroup 3 Facsimile compression (3),.SM CCITTGroup 4 Facsimile compression (4),Lempel-Ziv & Welch compression (5),baseline JPEG compression (7),word-aligned 1D Huffman compression (32771),andPackBits compression (32773).In addition, several nonstandard compression algorithms are supported:the 4-bit compression algorithm usedby the.I ThunderScanprogram (32809) (decompression only),NeXT's 2-bit compression algorithm (32766) (decompression only),an experimental LZ-style algorithm known as Deflate (32946), andan experimental CIE LogLuv compression scheme designed for imageswith high dynamic range (32845 for LogL and 32845 for LogLuv).Directory information may be in either little- or big-endian byteorder\-byte swapping is automatically done by the library.Data bit ordering may be either Most Significant Bit (\c.SM MSB\c) to Least Significant Bit (\c.SM LSB\c) or.SM LSBto.SM MSB.Finally, the library does not support files in which the.IR BitsPerSample ,.IR Compression ,.IR MinSampleValue ,or.IR MaxSampleValuefields are defined differently on a per-sample basis(in Rev. 6.0 the.I Compressiontag is not defined on a per-sample basis, so this is immaterial)..SH "DATA TYPES"The library makes extensive use of C typedefs to promote portability.Two sets of typedefs are used, one for communication with clientsof the library and one for internal data structures and parsing of the.SM TIFFformat.The following typedefs are exposed to users either throughfunction definitions or through parameters passed through thevarargs interfaces..in +.5i.sp 5p.ta +\w'typedef unsigned <\fIthing\fP> uint32; 'u.nftypedef unsigned short uint16; 16-bit unsigned integertypedef unsigned <\fIthing\fP> uint32; 32-bit unsigned integer.sp 5ptypedef unsigned int ttag_t; directory tagtypedef uint16 tdir_t; directory indextypedef uint16 tsample_t; sample numbertypedef uint32 tstrip_t; strip numbertypedef uint32 ttile_t; tile numbertypedef int32 tsize_t; i/o size in bytestypedef void* tdata_t; image data reftypedef void* thandle_t; client data handletypedef int32 toff_t; file offset.fi.sp 5p.in -.5iNote that.IR tstrip_t ,.IR ttile_t ,and.I tsize_tare constrained to be no more than 32-bit quantities by32-bit fields they are stored in in the.SM TIFFimage.Likewise.I tsample_tis limited by the 16-bit field used to store the.I SamplesPerPixeltag..I tdir_tconstrains the maximum number of.SM IFDsthat may appear in an image and may be an arbitrary size (w/o penalty). .I ttag_tmust be either int, unsigned int, pointer, or double becausethe library uses a varargs interface and.SM "ANSI C"restricts the type of the parameter before an ellipsis to be apromoted type..I toff_tis defined as int32 because TIFF file offsets are (unsigned) 32-bitquantities.A signed value is used because some interfaces return \-1 on error.Finally, note that user-specified data references arepassed as opaque handles and only cast at the lowest layers wheretheir type is presumed..SH "LIST OF ROUTINES"The following routines are part of the library.Consult specific manual pages for details on their operation.The manual page names listed below are for systemswhere the full function names can not be encoded in the filesystem;on most systems doing ``man function-name'' will work..sp 5p.nf.ta \w'TIFFWriteEncodedStrip'u+2n +\w'Appears on Page'u+2n\fIName\fP \fIAppears on Page\fP \fIDescription\fP.sp 5pTIFFCheckpointDirectory writedir.3t writes the current state of the directoryTIFFCheckTile tile.3t very x,y,z,sample is within imageTIFFCIELabToRGBInit color.3t initialize CIE L*a*b* 1976 to RGB conversion stateTIFFCIELabToXYZ color.3t perform CIE L*a*b* 1976 to CIE XYZ conversionTIFFClientOpen open.3t open a file for reading or writingTIFFClose close.3t close an open fileTIFFComputeStrip strip.3t return strip containing y,sampleTIFFComputeTile tile.3t return tile containing x,y,z,sampleTIFFCurrentDirectory query.3t return index of current directoryTIFFCurrentRow query.3t return index of current scanlineTIFFCurrentStrip query.3t return index of current stripTIFFCurrentTile query.3t return index of current tileTIFFDataWidth width.3t return the size of TIFF data typesTIFFError error.3t library error handlerTIFFFdOpen open.3t open a file for reading or writingTIFFFileName query.3t return name of open fileTIFFFileno query.3t return open file descriptorTIFFFindCODEC codec.3t find standard codec for the specific schemeTIFFFlush flush.3t flush all pending writesTIFFFlushData flush.3t flush pending data writesTIFFGetBitRevTable swab.3t return bit reversal tableTIFFGetField getfield.3t return tag value in current directoryTIFFGetFieldDefaulted getfield.3t return tag value in current directoryTIFFGetMode query.3t return open file modeTIFFGetVersion query.3t return library version stringTIFFIsCODECConfigured codec.3t check, whether we have working codecTIFFIsTiled query.3t return true if image data is tiledTIFFIsByteSwapped query.3t return true if image data is byte-swappedTIFFNumberOfStrips strip.3t return number of strips in an imageTIFFNumberOfTiles tile.3t return number of tiles in an imageTIFFOpen open.3t open a file for reading or writingTIFFPrintDirectory print.3t print description of the current directoryTIFFReadBufferSetup rdbuf.3t specify i/o buffer for readingTIFFReadDirectory readdir.3t read the next directoryTIFFReadEncodedStrip rdestrip.3t read and decode a strip of dataTIFFReadEncodedTile rdetile.3t read and decode a tile of dataTIFFReadRawStrip rdrstrip.3t read a raw strip of dataTIFFReadRawTile rdrtile.3t read a raw tile of dataTIFFReadRGBAImage rdimage.3t read an image into a fixed format rasterTIFFReadScanline readline.3t read and decode a row of dataTIFFReadTile readtile.3t read and decode a tile of dataTIFFRegisterCODEC codec.3t override standard codec for the specific schemeTIFFReverseBits swab.3t reverse bits in an array of bytesTIFFRGBAImageBegin rgbaimage.3t setup decoder state for TIFFRGBAImageGetTIFFRGBAImageEnd rgbaimage.3t release TIFFRGBAImage decoder stateTIFFRGBAImageGet rgbaimage.3t read and decode an imageTIFFRGBAImageOK rgbaimage.3t is image readable by TIFFRGBAImageGetTIFFScanlineSize size.3t return size of a scanlineTIFFSetDirectory setdir.3t set the current directoryTIFFSetSubDirectory setdir.3t set the current directoryTIFFSetErrorHandler error.3t set error handler functionTIFFSetField setfield.3t set a tag's value in the current directoryTIFFSetWarningHandler error.3t set warning handler functionTIFFStripSize strip.3t returns size of a stripTIFFRawStripSize strip.3t returns the number of bytes in a raw stripTIFFSwabShort swab.3t swap bytes of shortTIFFSwabLong swab.3t swap bytes of longTIFFSwabArrayOfShort swab.3t swap bytes of an array of shortsTIFFSwabArrayOfLong swab.3t swap bytes of an array of longsTIFFTileRowSize size.3t return size of a row in a tileTIFFTileSize size.3t return size of a tileTIFFUnRegisterCODEC codec.3t unregisters the codecTIFFVGetField getfield.3t return tag value in current directoryTIFFVGetFieldDefaulted getfield.3t return tag value in current directoryTIFFVSetField setfield.3t set a tag's value in the current directoryTIFFVStripSize strip.3t returns the number of bytes in a stripTIFFWarning warning.3t library warning handlerTIFFWriteDirectory writedir.3t write the current directoryTIFFWriteEncodedStrip wrestrip.3t compress and write a strip of dataTIFFWriteEncodedTile wretile.3t compress and write a tile of dataTIFFWriteRawStrip wrrstrip.3t write a raw strip of dataTIFFWriteRawTile wrrtile.3t write a raw tile of dataTIFFWriteScanline writeline.3t write a scanline of dataTIFFWriteTile wrrtile.3t compress and write a tile of dataTIFFXYZToRGB color.3t perform CIE XYZ to RGB conversionTIFFYCbCrToRGBInit color.3t initialize YCbCr to RGB conversion stateTIFFYCbCrtoRGB color.3t perform YCbCr to RGB conversion.fi.SH "TAG USAGE"The table below lists the.SM TIFFtags that are recognized and handled by the library.If no use is indicated in the table, then the libraryreads and writes the tag, but does not use it internally.Note that some tags are meaningful only when a particularcompression scheme is being used; e.g..I Group3Optionsis only useful if .I Compressionis set to.SM CCITTGroup 3 encoding.Tags of this sort are considered.I codec-specifictags and the library does not recognize them except when the.I Compressiontag has been previously set to the relevant compression scheme..sp 5p.nf.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Value'u+2n +\w'R/W'u+2n\fITag Name\fP \fIValue\fP \fIR/W\fP \fILibrary Use/Notes\fP.sp 5p.nfArtist 315 R/WBadFaxLines 326 R/WBitsPerSample 258 R/W lotsCellLength 265 parsed but ignoredCellWidth 264 parsed but ignored
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -