Leptonica  1.82.0
Image processing and image analysis suite
L_Memstream Struct Reference

Data Fields

l_uint8 * buffer
 
size_t bufsize
 
size_t offset
 
size_t hw
 
l_uint8 ** poutdata
 
size_t * poutsize
 

Detailed Description

Memory stream buffer used with TIFFClientOpen()

The L_Memstram buffer has different functions in writing and reading.

  • In reading, it is assigned to the data and read from as the tiff library uncompresses the data and generates the pix. The offset points to the current read position in the data, and the hw always gives the number of bytes of data. The outdata and outsize ptrs are not used. When finished, tiffCloseCallback() simply frees the L_Memstream.
  • In writing, it accepts the data that the tiff library produces when a pix is compressed. the buffer points to a malloced area of bufsize bytes. The current writing position in the buffer is offset and the most ever written is hw. The buffer is expanded as necessary. When finished, tiffCloseCallback() assigns the outdata and outsize ptrs to the buffer and bufsize results, and frees the L_Memstream.

Definition at line 2346 of file tiffio.c.


The documentation for this struct was generated from the following file: