#include <tiffio.h> int TIFFReadBufferSetup(TIFF *tif, tdata_t buffer, tsize_t size); int TIFFWriteBufferSetup(TIFF *tif, tdata_t buffer, tsize_t size);
TIFFReadBufferSetup sets up the data buffer used to read raw (encoded) data from a file. If the specified pointer is NULL (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. TIFFReadBufferSetup returns a non-zero value if the setup was successful and zero otherwise.
TIFFWriteBufferSetup sets up the data buffer used to write raw (encoded) data to a file. If the specified size 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 buffer is NULL (zero), then a buffer of the appropriate size is dynamically allocated. TIFFWriteBufferSetup returns a non-zero value if the setup was successful and zero otherwise.
%s: No space for output buffer. TIFFWriteBufferSetup was unable to dynamically allocate space for a data buffer.
Libtiff library home page: http://www.remotesensing.org/libtiff/