.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TIFFBUFFER" "3tiff" "Nov 26, 2023" "4.6" "LibTIFF" .SH NAME TIFFbuffer \- I/O buffering control routines .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int TIFFReadBufferSetup(TIFF *tif, tdata_t buffer, tsize_t size) .UNINDENT .INDENT 0.0 .TP .B int TIFFWriteBufferSetup(TIFF *tif, tdata_t buffer, tsize_t size) .UNINDENT .SH DESCRIPTION .sp The following routines are provided for client\-control of the I/O buffers used by the library. Applications need never use these routines; they are provided only for \(dqintelligent clients\(dq that wish to optimize memory usage and/or eliminate potential copy operations that can occur when working with images that have data stored without compression. .sp \fI\%TIFFReadBufferSetup()\fP sets up the data buffer used to read raw (encoded) data from a file. If the specified pointer is \fBNULL\fP (zero), then a buffer of the appropriate size is allocated. Otherwise the caller must guarantee that the buffer is large enough to hold any individual strip of raw data. \fI\%TIFFReadBufferSetup()\fP returns a non\-zero value if the setup was successful and zero otherwise. .sp \fI\%TIFFWriteBufferSetup()\fP sets up the data buffer used to write raw (encoded) data to a file. If the specified \fIsize\fP is \-1, then the buffer size is selected to hold a complete tile or strip, or at least 8 kilobytes, whichever is greater. If the specified \fIbuffer\fP is \fBNULL\fP (zero), then a buffer of the appropriate size is dynamically allocated. \fI\%TIFFWriteBufferSetup()\fP returns a non\-zero value if the setup was successful and zero otherwise. .SH DIAGNOSTICS .sp \fB%s: No space for data buffer at scanline %ld\fP: .INDENT 0.0 .INDENT 3.5 \fI\%TIFFReadBufferSetup()\fP was unable to dynamically allocate space for a data buffer. .UNINDENT .UNINDENT .sp \fB%s: No space for output buffer\fP: .INDENT 0.0 .INDENT 3.5 \fI\%TIFFWriteBufferSetup()\fP was unable to dynamically allocate space for a data buffer. .UNINDENT .UNINDENT .SH SEE ALSO .sp \fI\%libtiff\fP (3tiff) .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2023, LibTIFF contributors .\" Generated by docutils manpage writer. .