Blame man/TIFFbuffer.3tiff

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