| 1 |
TIFFReadFromUserBuffer |
| 2 |
====================== |
| 3 |
|
| 4 |
Synopsis |
| 5 |
-------- |
| 6 |
|
| 7 |
.. highlight:: c |
| 8 |
|
| 9 |
:: |
| 10 |
|
| 11 |
#include <tiffio.h> |
| 12 |
|
| 13 |
.. c:function:: int TIFFReadFromUserBuffer(TIFF* tif, uint32_t strile, void* inbuf, tmsize_t insize, void* outbuf, tmsize_t outsize) |
| 14 |
|
| 15 |
Description |
| 16 |
----------- |
| 17 |
|
| 18 |
Use the provided input buffer (`inbuf`, `insize`) and decompress it |
| 19 |
into (`outbuf`, `outsize`). This function replaces the use of |
| 20 |
:c:func:`TIFFReadEncodedStrip` / :c:func:`TIFFReadEncodedTile` |
| 21 |
when the user can provide the buffer for the input data, for example when |
| 22 |
he wants to avoid ``libtiff`` to read the strile offset/count values from the |
| 23 |
``StripOffsets`` / ``StripByteCounts`` or ``TileOffsets`` / |
| 24 |
``TileByteCounts`` arrays. `inbuf` content must be writable |
| 25 |
(if bit reversal is needed). |
| 26 |
|
| 27 |
|
| 28 |
Return values |
| 29 |
------------- |
| 30 |
|
| 31 |
Returns 1 in case of success, 0 otherwise. |
| 32 |
|
| 33 |
Diagnostics |
| 34 |
----------- |
| 35 |
|
| 36 |
All error messages are directed to the :c:func:`TIFFErrorExtR` routine. |
| 37 |
|
| 38 |
See also |
| 39 |
-------- |
| 40 |
|
| 41 |
:doc:`TIFFOpen` (3tiff), |
| 42 |
:doc:`TIFFReadRawStrip` (3tiff), |
| 43 |
:doc:`TIFFReadScanline` (3tiff), |
| 44 |
:doc:`TIFFReadEncodedStrip` (3tiff), |
| 45 |
:doc:`TIFFReadEncodedTile` (3tiff), |
| 46 |
:doc:`libtiff` (3tiff), |