Blame man/TIFFWriteEncodedStrip.3tiff

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