]> git.saurik.com Git - wxWidgets.git/blob - src/tiff/man/TIFFWriteEncodedStrip.3tiff
cfe41268de50f782106324350f70db9956c9f8ed
[wxWidgets.git] / src / tiff / man / TIFFWriteEncodedStrip.3tiff
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 TIFFWriteEncodedStrip 3TIFF "October 15, 1995" "libtiff"
26 .SH NAME
27 TIFFWritedEncodedStrip \- compress and write a strip of data to an open
28 .SM TIFF
29 file
30 .SH SYNOPSIS
31 .B "#include <tiffio.h>"
32 .sp
33 .BI "tsize_t TIFFWriteEncodedStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")"
34 .SH DESCRIPTION
35 Compress
36 .I size
37 bytes of raw data from
38 .I buf
39 and write the result to the specified strip; replacing any previously written
40 data. Note that the value of
41 .I strip
42 is a ``raw strip number.'' That is, the caller must take into account whether
43 or not the data are organized in separate planes (\c
44 .IR PlanarConfiguration =2).
45 .SH NOTES
46 The library writes encoded data using the native machine byte order. Correctly
47 implemented
48 .SM TIFF
49 readers are expected to do any necessary byte-swapping to correctly process
50 image data with BitsPerSample greater than 8.
51 .PP
52 The strip number must be valid according to the current settings of the
53 .I ImageLength
54 and
55 .I RowsPerStrip
56 tags.
57 An image may be dynamically grown by increasing the value of
58 .I ImageLength
59 prior to each call to
60 .IR TIFFWriteEncodedStrip .
61 .SH "RETURN VALUES"
62 \-1 is returned if an error was encountered. Otherwise, the value of
63 .IR size
64 is returned.
65 .SH DIAGNOSTICS
66 All error messages are directed to the
67 .IR TIFFError (3TIFF)
68 routine.
69 .PP
70 \fB%s: File not open for writing\fP. The file was opened for reading, not
71 writing.
72 .PP
73 \fBCan not write scanlines to a tiled image\fP. The image is assumed to be
74 organized in tiles because the
75 .I TileWidth
76 and
77 .I TileLength
78 tags have been set with
79 .IR TIFFSetField (3TIFF).
80 .PP
81 \fB%s: Must set "ImageWidth" before writing data\fP.
82 The image's width has not be set before the first write. See
83 .IR TIFFSetField (3TIFF)
84 for information on how to do this.
85 .PP
86 \fB%s: Must set "PlanarConfiguration" before writing data\fP.
87 The organization of data has not be defined before the first write. See
88 .IR TIFFSetField (3TIFF)
89 for information on how to do this.
90 .PP
91 \fB%s: No space for strip arrays"\fP.
92 There was not enough space for the arrays that hold strip offsets and byte
93 counts.
94 .SH "SEE ALSO"
95 .BR TIFFOpen (3TIFF),
96 .BR TIFFWriteScanline (3TIFF),
97 .BR TIFFWriteRawStrip (3TIFF),
98 .BR libtiff (3TIFF)
99 .PP
100 Libtiff library home page:
101 .BR http://www.remotesensing.org/libtiff/