]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/man/TIFFWriteScanline.3tiff
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / src / tiff / man / TIFFWriteScanline.3tiff
CommitLineData
8414a40c
VZ
1.\"
2.\" Copyright (c) 1988-1997 Sam Leffler
3.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
4.\"
5.\" Permission to use, copy, modify, distribute, and sell this software and
6.\" its documentation for any purpose is hereby granted without fee, provided
7.\" that (i) the above copyright notices and this permission notice appear in
8.\" all copies of the software and related documentation, and (ii) the names of
9.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
10.\" publicity relating to the software without the specific, prior written
11.\" permission of Sam Leffler and Silicon Graphics.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16.\"
17.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22.\" OF THIS SOFTWARE.
23.\"
24.if n .po 0
25.TH TIFFWriteScanline 3TIFF "December 16, 1991" "libtiff"
26.SH NAME
27TIFFWriteScanline \- write a scanline to an open
28.SM TIFF
29file
30.SH SYNOPSIS
31.B "#include <tiffio.h>"
32.sp
33.BI "int TIFFWriteScanline(TIFF *" tif ", tdata_t " buf ", uint32 " row ", tsample_t " sample ")"
34.SH DESCRIPTION
35Write data to a file at the specified row. The
36.I sample
37parameter is used only if data are organized in separate planes (\c
38.IR PlanarConfiguration =2).
39The data are assumed to be uncompressed and in the native bit- and byte-order
40of the host machine. The data written to the file is compressed according to
41the compression scheme of the current
42.SM TIFF
43directory (see further below). If the current scanline is past the end of the
44current subfile, the
45.I ImageLength
46field is automatically increased to include the scanline (except
47for
48.IR PlanarConfiguration =2,
49where the
50.I ImageLength
51cannot be changed once the first data are written). If the
52.I ImageLength
53is increased, the
54.I StripOffsets
55and
56.I StripByteCounts
57fields are similarly enlarged to reflect data written past the previous end of
58image.
59.SH NOTES
60The library writes encoded data using the native machine byte order. Correctly
61implemented
62.SM TIFF
63readers are expected to do any necessary byte-swapping to correctly process
64image data with BitsPerSample greater than 8. The library attempts to hide
65bit-ordering differences between the image and the native machine by
66converting data from the native machine order.
67.PP
68In C++ the
69.I sample
70parameter defaults to 0.
71.PP
72Once data are written to a file for the current directory, the values of
73certain tags may not be altered; see
74.IR TIFFSetField (3TIFF)
75for more information.
76.PP
77It is not possible to write scanlines to a file that uses a tiled
78organization. The routine
79.IR TIFFIsTiled
80can be used to determine if the file is organized as tiles or strips.
81.SH "RETURN VALUES"
82.IR TIFFWriteScanline
83returns \-1 if it immediately detects an error and 1 for a successful write.
84.SH DIAGNOSTICS
85All error messages are directed to the
86.IR TIFFError (3TIFF)
87routine.
88.PP
89.BR "%s: File not open for writing .
90The file was opened for reading, not writing.
91.PP
92.BR "Can not write scanlines to a tiled image" .
93An attempt was made to write a scanline to a tiled image. The image is assumed
94to be organized in tiles because the
95.I TileWidth
96and
97.I TileLength
98tags have been set with
99.IR TIFFSetField (3TIFF).
100.PP
101.BR "Compression algorithm does not support random access" .
102Data was written in a non-sequential order to a file that uses a compression
103algorithm and that has
104.I RowsPerStrip
105greater than one. That is, data in the image is to be stored in a compressed
106form, and with multiple rows packed into a strip. In this case, the library
107does not support random access to the data. The data should either be written
108as entire strips, sequentially by rows, or the value of
109.I RowsPerStrip
110should be set to one.
111.PP
112\fB%s: Must set "ImageWidth" before writing data\fP.
113The image's width has not be set before the first write.
114See
115.BR TIFFSetField (3TIFF)
116for information on how to do this.
117.PP
118\fB%s: Must set "PlanarConfiguration" before writing data\fP.
119The organization of data has not be defined before the first write.
120See
121.BR TIFFSetField (3TIFF)
122for information on how to do this.
123.PP
124\fBCan not change "ImageLength" when using separate planes\fP. Separate image
125planes are being used (\c
126.IR PlanarConfiguration =2),
127but the number of rows has not been specified before the first write. The
128library supports the dynamic growth of an image only when data are organized
129in a contiguous manner (\c
130.IR PlanarConfiguration =1).
131.PP
132.BR "%d: Sample out of range, max %d" .
133The
134.I sample
135parameter was greater than the value of the SamplesPerPixel tag.
136.PP
137.BR "%s: No space for strip arrays .
138There was not enough space for the arrays that hold strip offsets and byte
139counts.
140.SH BUGS
141Writing subsampled YCbCR data does not work correctly because, for
142.IR PlanarConfiguration =2
143the size of a scanline is not calculated on a per-sample basis, and for
144.IR PlanarConfiguration =1
145the library does not pack the block-interleaved samples.
146.SH "SEE ALSO"
147.BR TIFFOpen (3TIFF),
148.BR TIFFWriteEncodedStrip (3TIFF),
149.BR TIFFWriteRawStrip (3TIFF),
150.BR libtiff (3TIFF)
151.PP
152Libtiff library home page:
153.BR http://www.remotesensing.org/libtiff/