| Current File : //usr/man/man3tiff/TIFFWriteEncodedStrip.3tiff |
'\" te
.TH TIFFWriteEncodedStrip 3tiff "05 Apr 2004" "" ""
.SH "NAME"
TIFFWriteEncodedStrip \- compress and write a strip of data to an open TIFF file
.SH "SYNOPSIS"
.sp
.nf
\f(CW#include <tiffio\&.h>
tsize_t TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip,
tdata_t buf, tsize_t size)\fR
.fi
.sp
.SH ""
.PP
Compress \fBsize\fR bytes of raw data from \fBbuf\fR and write the result to the specified strip, replacing any previously
written data\&. Note that the value of \fBstrip\fR is a "raw
strip number"\&. That is, the caller must take into account whether or
not the data is organized in separate planes (PlanarConfiguration=2)\&.
.SH ""
.PP
The library writes encoded data using the native machine byte order\&.
Correctly implemented TIFF readers are expected to do any necessary byte-swapping
to correctly process image data with \fBBitsPerSample\fR greater
than 8\&.
.PP
The strip number must be valid according to the current settings of
the \fBImageLength\fR and \fBRowsPerStrip\fR tags\&.
An image may be dynamically grown by increasing the value of \fBImageLength\fR prior to each call to \fBTIFFWriteEncodedStrip\fR\&.
.SS "Diagnostics"
.PP
All error messages are directed to the \fBTIFFError(3tiff)\fR
routine\&.
.sp
.ne 2
.mk
\fB%s: File not open for writing\&.\fR
.in +24n
.rt
The file was opened for reading, not writing\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fBCan not write scanlines to a tiled image\&.\fR
.in +24n
.rt
The image is assumed to be organized in tiles because the \fBTileWidth\fR and \fBTileLength\fR tags have been set with \fBTIFFSetField(3tiff)\fR\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fB%s: Must set "ImageWidth" before writing data\&.\fR
.in +24n
.rt
The image width has not been set before the first write\&. See \fBTIFFSetField(3tiff)\fR for information on how to do this\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fB%s: Must set "PlanarConfiguration" before writing data\&.\fR
.in +24n
.rt
The organization of data has not been defined before
the first write\&. See \fBTIFFSetField(3tiff)\fR for information on
how to do this\&.
.sp
.sp 1
.in -24n
.sp
.ne 2
.mk
\fB%s: No space for strip arrays"\&.\fR
.in +24n
.rt
There was not enough space for the arrays that hold strip offsets and byte
counts\&.
.sp
.sp 1
.in -24n
.SH ""
.PP
-1 is returned if an error was encountered\&. Otherwise, the value of \fBsize\fR is returned\&.
.SH ""
.PP
See \fBattributes\fR(5)
for descriptions of the following attributes:
.sp
.TS
tab() allbox;
cw(2.750000i)| cw(2.750000i)
lw(2.750000i)| lw(2.750000i).
ATTRIBUTE TYPEATTRIBUTE VALUE
Availabilityimage/library/libtiff
Interface stabilityUncommitted
.TE
.sp
.SH ""
.PP
\fBlibtiff\fR(3), \fBTIFFOpen\fR(3tiff), \fBTIFFWriteRawStrip\fR(3tiff), \fBTIFFWriteScanline\fR(3tiff)
.SH ""
.PP
This man page was originally written by Sam Leffler\&. Updated by Breda
McColgan, Sun Microsystems Inc\&., 2004\&.
...\" created by instant / solbook-to-man, Thu 20 Mar 2014, 02:30
...\" LSARC 2003/085 libtiff, libjpeg, and libpng