|
kusano |
7d535a |
.\" $Id: TIFFbuffer.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
|
|
kusano |
7d535a |
.\"
|
|
kusano |
7d535a |
.\" Copyright (c) 1995 Sam Leffler
|
|
kusano |
7d535a |
.\" Copyright (c) 1995 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 TIFFBUFFER 3TIFF "November 1, 2005" "libtiff"
|
|
kusano |
7d535a |
.SH NAME
|
|
kusano |
7d535a |
TIFFReadBufferSetup, TIFFWriteBufferSetup \- I/O buffering control routines
|
|
kusano |
7d535a |
.SH SYNOPSIS
|
|
kusano |
7d535a |
.nf
|
|
kusano |
7d535a |
.B "#include <tiffio.h>"</tiffio.h>
|
|
kusano |
7d535a |
.sp
|
|
kusano |
7d535a |
.BI "int TIFFReadBufferSetup(TIFF *" tif ", tdata_t " buffer ", tsize_t " size ");"
|
|
kusano |
7d535a |
.BI "int TIFFWriteBufferSetup(TIFF *" tif ", tdata_t " buffer ", tsize_t " size ");"
|
|
kusano |
7d535a |
.fi
|
|
kusano |
7d535a |
.SH DESCRIPTION
|
|
kusano |
7d535a |
The following routines are provided for client-control of the I/O buffers used
|
|
kusano |
7d535a |
by the library. Applications need never use these routines; they are provided
|
|
kusano |
7d535a |
only for ``intelligent clients'' that wish to optimize memory usage and/or
|
|
kusano |
7d535a |
eliminate potential copy operations that can occur when working with images
|
|
kusano |
7d535a |
that have data stored without compression.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.I TIFFReadBufferSetup
|
|
kusano |
7d535a |
sets up the data buffer used to read raw (encoded) data from a file. If the
|
|
kusano |
7d535a |
specified pointer is
|
|
kusano |
7d535a |
.SM NULL
|
|
kusano |
7d535a |
(zero), then a buffer of the appropriate size is allocated. Otherwise the
|
|
kusano |
7d535a |
caller must guarantee that the buffer is large enough to hold any individual
|
|
kusano |
7d535a |
strip of raw data.
|
|
kusano |
7d535a |
.I TIFFReadBufferSetup
|
|
kusano |
7d535a |
returns a non-zero value if the setup was successful and zero otherwise.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.I TIFFWriteBufferSetup
|
|
kusano |
7d535a |
sets up the data buffer used to write raw (encoded) data to a file. If the
|
|
kusano |
7d535a |
specified
|
|
kusano |
7d535a |
.I size
|
|
kusano |
7d535a |
is \-1 then the buffer size is selected to hold a complete tile or strip, or
|
|
kusano |
7d535a |
at least 8 kilobytes, whichever is greater. If the specified
|
|
kusano |
7d535a |
.I buffer
|
|
kusano |
7d535a |
is
|
|
kusano |
7d535a |
.SM NULL
|
|
kusano |
7d535a |
(zero), then a buffer of the appropriate size is dynamically allocated.
|
|
kusano |
7d535a |
.I TIFFWriteBufferSetup
|
|
kusano |
7d535a |
returns a non-zero value if the setup was successful and zero otherwise.
|
|
kusano |
7d535a |
.SH DIAGNOSTICS
|
|
kusano |
7d535a |
.BR "%s: No space for data buffer at scanline %ld" .
|
|
kusano |
7d535a |
.I TIFFReadBufferSetup
|
|
kusano |
7d535a |
was unable to dynamically allocate space for a data buffer.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.BR "%s: No space for output buffer" .
|
|
kusano |
7d535a |
.I TIFFWriteBufferSetup
|
|
kusano |
7d535a |
was unable to dynamically allocate space for a data buffer.
|
|
kusano |
7d535a |
.SH "SEE ALSO"
|
|
kusano |
7d535a |
.BR libtiff (3TIFF)
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
Libtiff library home page:
|
|
kusano |
7d535a |
.BR http://www.remotesensing.org/libtiff/
|