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