📄 tiffwritescanline.3t
字号:
.\" $Header: /cvsroot/osrs/libtiff/man/TIFFWriteScanline.3t,v 1.1.1.1 1999/07/27 21:50:27 mike 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 TIFFWriteScanline 3T "December 16, 1991".SH NAMETIFFWriteScanline \- write a scanline to an open.SM TIFFfile.SH SYNOPSIS.B "#include <tiffio.h>".br.B "int TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)".SH DESCRIPTIONWrite data to a file at the specified row.The.I sampleparameter is used only if data are organized in separate planes (\c.IR PlanarConfiguration =2).The data are assumed to be uncompressed and in the nativebit- and byte-order of the host machine.The data written to the file iscompressed according to the compression schemeof the current.SM TIFFdirectory (see further below).If the current scanline is past the end of the current subfile, the.I ImageLengthfield is automatically increased to include the scanline (exceptfor.IR PlanarConfiguration =2,where the.I ImageLengthcannot be changed once the first data are written).If the.I ImageLengthis increased, the.I StripOffsetsand.I StripByteCountsfields are similarly enlarged to reflect data written past theprevious end of image..SH NOTESThe library writes encoded data using the native machine byte order.Correctly implemented.SM TIFFreaders are expected to do any necessary byte-swapping tocorrectly process image data with BitsPerSample greater than 8.The library attempts to hide bit-ordering differencesbetween the image and the native machine by converting datafrom the native machine order..PPIn C++ the.I sampleparameter defaults to 0..PPOnce data are written to a file for the current directory,the values of certain tags may not be altered; see.IR TIFFSetField (3T)for more information..PPIt is not possible to write scanlines to a file thatuses a tiled organization. The routine.IR TIFFIsTiledcan be used to determine if the file is organizedas tiles or strips..SH "RETURN VALUES".IR TIFFWriteScanlinereturns \-1 if it immediately detects an errorand 1 for a successful write..SH DIAGNOSTICSAll error messages are directed to the.IR TIFFError (3T)routine..PP.BR "%s: File not open for writing .The file was opened for reading, not writing..PP.BR "Can not write scanlines to a tiled image" .An attempt was made to write a scanline to a tiled image.The image is assumed to be organized in tiles because the.I TileWidthand.I TileLengthtags have been set with.IR TIFFSetField (3T)..PP.BR "Compression algorithm does not support random access" .Data was written in a non-sequential order to a file thatuses a compression algorithm and that has.I RowsPerStripgreater than one.That is, data in the image is to be stored in a compressed form,and with multiple rows packed into a strip.In this case, the library does not support random access to the data.The data should either be written as entire strips,sequentially by rows, or the value of.I RowsPerStripshould be set to one..PP\fB%s: Must set "ImageWidth" before writing data\fP.The image's width has not be set before the first write.See.IR TIFFSetField (3T)for information on how to do this..PP\fB%s: Must set "PlanarConfiguration" before writing data\fP.The organization of data has not be defined before the first write.See.IR TIFFSetField (3T)for information on how to do this..PP\fBCan not change "ImageLength" when using separate planes\fP.Separate image planes are being used (\c.IR PlanarConfiguration =2),but the number of rows has not been specified before the first write.The library supports the dynamic growth of an image only when dataare organized in a contiguous manner (\c.IR PlanarConfiguration =1)..PP.BR "%d: Sample out of range, max %d" .The.I sampleparameter was greater than the value of the SamplesPerPixel tag..PP.BR "%s: No space for strip arrays .There was not enough space for the arrays that hold stripoffsets and byte counts..SH BUGSWriting subsampled YCbCR data does not work correctlybecause, for .IR PlanarConfiguration =2the size of a scanline is not calculated on a per-sample basis,and for.IR PlanarConfiguration =1the library does not pack the block-interleaved samples..SH "SEE ALSO".IR libtiff (3T),.IR TIFFOpen (3T),.IR TIFFWriteEncodedStrip (3T),.IR TIFFWriteRawStrip (3T)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -