Blame man/TIFFbuffer.3tiff

Packit 994f1a
.\" $Id: TIFFbuffer.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
Packit 994f1a
.\"
Packit 994f1a
.\" Copyright (c) 1995 Sam Leffler
Packit 994f1a
.\" Copyright (c) 1995 Silicon Graphics, Inc.
Packit 994f1a
.\"
Packit 994f1a
.\" Permission to use, copy, modify, distribute, and sell this software and 
Packit 994f1a
.\" its documentation for any purpose is hereby granted without fee, provided
Packit 994f1a
.\" that (i) the above copyright notices and this permission notice appear in
Packit 994f1a
.\" all copies of the software and related documentation, and (ii) the names of
Packit 994f1a
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
Packit 994f1a
.\" publicity relating to the software without the specific, prior written
Packit 994f1a
.\" permission of Sam Leffler and Silicon Graphics.
Packit 994f1a
.\" 
Packit 994f1a
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
Packit 994f1a
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
Packit 994f1a
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
Packit 994f1a
.\" 
Packit 994f1a
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
Packit 994f1a
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
Packit 994f1a
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
Packit 994f1a
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
Packit 994f1a
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
Packit 994f1a
.\" OF THIS SOFTWARE.
Packit 994f1a
.\"
Packit 994f1a
.if n .po 0
Packit 994f1a
.TH TIFFBUFFER 3TIFF "November 1, 2005" "libtiff"
Packit 994f1a
.SH NAME
Packit 994f1a
TIFFReadBufferSetup, TIFFWriteBufferSetup \- I/O buffering control routines
Packit 994f1a
.SH SYNOPSIS
Packit 994f1a
.nf
Packit 994f1a
.B "#include <tiffio.h>"
Packit 994f1a
.sp
Packit 994f1a
.BI "int TIFFReadBufferSetup(TIFF *" tif ", tdata_t " buffer ", tsize_t " size ");"
Packit 994f1a
.BI "int TIFFWriteBufferSetup(TIFF *" tif ", tdata_t " buffer ", tsize_t " size ");"
Packit 994f1a
.fi
Packit 994f1a
.SH DESCRIPTION
Packit 994f1a
The following routines are provided for client-control of the I/O buffers used
Packit 994f1a
by the library. Applications need never use these routines; they are provided
Packit 994f1a
only for ``intelligent clients'' that wish to optimize memory usage and/or
Packit 994f1a
eliminate potential copy operations that can occur when working with images
Packit 994f1a
that have data stored without compression.
Packit 994f1a
.PP
Packit 994f1a
.I TIFFReadBufferSetup
Packit 994f1a
sets up the data buffer used to read raw (encoded) data from a file. If the
Packit 994f1a
specified pointer is
Packit 994f1a
.SM NULL
Packit 994f1a
(zero), then a buffer of the appropriate size is allocated. Otherwise the
Packit 994f1a
caller must guarantee that the buffer is large enough to hold any individual
Packit 994f1a
strip of raw data.
Packit 994f1a
.I TIFFReadBufferSetup
Packit 994f1a
returns a non-zero value if the setup was successful and zero otherwise.
Packit 994f1a
.PP
Packit 994f1a
.I TIFFWriteBufferSetup
Packit 994f1a
sets up the data buffer used to write raw (encoded) data to a file. If the
Packit 994f1a
specified
Packit 994f1a
.I size
Packit 994f1a
is \-1 then the buffer size is selected to hold a complete tile or strip, or
Packit 994f1a
at least 8 kilobytes, whichever is greater. If the specified
Packit 994f1a
.I buffer
Packit 994f1a
is 
Packit 994f1a
.SM NULL
Packit 994f1a
(zero), then a buffer of the appropriate size is dynamically allocated.
Packit 994f1a
.I TIFFWriteBufferSetup
Packit 994f1a
returns a non-zero value if the setup was successful and zero otherwise.
Packit 994f1a
.SH DIAGNOSTICS
Packit 994f1a
.BR "%s: No space for data buffer at scanline %ld" .
Packit 994f1a
.I TIFFReadBufferSetup
Packit 994f1a
was unable to dynamically allocate space for a data buffer.
Packit 994f1a
.PP
Packit 994f1a
.BR "%s: No space for output buffer" .
Packit 994f1a
.I TIFFWriteBufferSetup
Packit 994f1a
was unable to dynamically allocate space for a data buffer.
Packit 994f1a
.SH "SEE ALSO"
Packit 994f1a
.BR libtiff (3TIFF)
Packit 994f1a
.PP
Packit 994f1a
Libtiff library home page:
Packit 994f1a
.BR http://www.remotesensing.org/libtiff/