roentgen b75cab
.\" $Id: TIFFWriteEncodedStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
roentgen b75cab
.\"
roentgen b75cab
.\" Copyright (c) 1988-1997 Sam Leffler
roentgen b75cab
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
roentgen b75cab
.\"
roentgen b75cab
.\" Permission to use, copy, modify, distribute, and sell this software and 
roentgen b75cab
.\" its documentation for any purpose is hereby granted without fee, provided
roentgen b75cab
.\" that (i) the above copyright notices and this permission notice appear in
roentgen b75cab
.\" all copies of the software and related documentation, and (ii) the names of
roentgen b75cab
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
roentgen b75cab
.\" publicity relating to the software without the specific, prior written
roentgen b75cab
.\" permission of Sam Leffler and Silicon Graphics.
roentgen b75cab
.\" 
roentgen b75cab
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
roentgen b75cab
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
roentgen b75cab
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
roentgen b75cab
.\" 
roentgen b75cab
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
roentgen b75cab
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
roentgen b75cab
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
roentgen b75cab
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
roentgen b75cab
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
roentgen b75cab
.\" OF THIS SOFTWARE.
roentgen b75cab
.\"
roentgen b75cab
.if n .po 0
roentgen b75cab
.TH TIFFWriteEncodedStrip 3TIFF "October 15, 1995" "libtiff"
roentgen b75cab
.SH NAME
roentgen b75cab
TIFFWritedEncodedStrip \- compress and write a strip of data to an open
roentgen b75cab
.SM TIFF
roentgen b75cab
file
roentgen b75cab
.SH SYNOPSIS
roentgen b75cab
.B "#include <tiffio.h>"</tiffio.h>
roentgen b75cab
.sp
roentgen b75cab
.BI "tsize_t TIFFWriteEncodedStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")"
roentgen b75cab
.SH DESCRIPTION
roentgen b75cab
Compress
roentgen b75cab
.I size
roentgen b75cab
bytes of raw data from
roentgen b75cab
.I buf
roentgen b75cab
and write the result to the specified strip; replacing any previously written
roentgen b75cab
data. Note that the value of
roentgen b75cab
.I strip
roentgen b75cab
is a ``raw strip number.'' That is, the caller must take into account whether
roentgen b75cab
or not the data are organized in separate planes (\c
roentgen b75cab
.IR PlanarConfiguration =2).
roentgen b75cab
.SH NOTES
roentgen b75cab
The library writes encoded data using the native machine byte order. Correctly
roentgen b75cab
implemented
roentgen b75cab
.SM TIFF
roentgen b75cab
readers are expected to do any necessary byte-swapping to correctly process
roentgen b75cab
image data with BitsPerSample greater than 8.
roentgen b75cab
.PP
roentgen b75cab
The strip number must be valid according to the current settings of the
roentgen b75cab
.I ImageLength
roentgen b75cab
and
roentgen b75cab
.I RowsPerStrip
roentgen b75cab
tags.
roentgen b75cab
An image may be dynamically grown by increasing the value of
roentgen b75cab
.I ImageLength
roentgen b75cab
prior to each call to
roentgen b75cab
.IR TIFFWriteEncodedStrip .
roentgen b75cab
.SH "RETURN VALUES"
roentgen b75cab
\-1 is returned if an error was encountered. Otherwise, the value of
roentgen b75cab
.IR size
roentgen b75cab
is returned.
roentgen b75cab
.SH DIAGNOSTICS
roentgen b75cab
All error messages are directed to the
roentgen b75cab
.IR TIFFError (3TIFF)
roentgen b75cab
routine.
roentgen b75cab
.PP
roentgen b75cab
\fB%s: File not open for writing\fP. The file was opened for reading, not
roentgen b75cab
writing.
roentgen b75cab
.PP
roentgen b75cab
\fBCan not write scanlines to a tiled image\fP. The image is assumed to be
roentgen b75cab
organized in tiles because the
roentgen b75cab
.I TileWidth
roentgen b75cab
and
roentgen b75cab
.I TileLength
roentgen b75cab
tags have been set with
roentgen b75cab
.IR TIFFSetField (3TIFF).
roentgen b75cab
.PP
roentgen b75cab
\fB%s: Must set "ImageWidth" before writing data\fP.
roentgen b75cab
The image's width has not be set before the first write. See
roentgen b75cab
.IR TIFFSetField (3TIFF)
roentgen b75cab
for information on how to do this.
roentgen b75cab
.PP
roentgen b75cab
\fB%s: Must set "PlanarConfiguration" before writing data\fP.
roentgen b75cab
The organization of data has not be defined before the first write. See
roentgen b75cab
.IR TIFFSetField (3TIFF)
roentgen b75cab
for information on how to do this.
roentgen b75cab
.PP
roentgen b75cab
\fB%s: No space for strip arrays"\fP.
roentgen b75cab
There was not enough space for the arrays that hold strip offsets and byte
roentgen b75cab
counts.
roentgen b75cab
.SH "SEE ALSO"
roentgen b75cab
.BR TIFFOpen (3TIFF),
roentgen b75cab
.BR TIFFWriteScanline (3TIFF),
roentgen b75cab
.BR TIFFWriteRawStrip (3TIFF),
roentgen b75cab
.BR libtiff (3TIFF)
roentgen b75cab
.PP
roentgen b75cab
Libtiff library home page:
roentgen b75cab
.BR http://www.remotesensing.org/libtiff/