| 1 |
TIFFReadTile |
| 2 |
============ |
| 3 |
|
| 4 |
Synopsis |
| 5 |
-------- |
| 6 |
|
| 7 |
.. highlight:: c |
| 8 |
|
| 9 |
:: |
| 10 |
|
| 11 |
#include <tiffio.h> |
| 12 |
|
| 13 |
.. c:function:: tsize_t TIFFReadTile(TIFF* tif, tdata_t buf, uint32_t x, uint32_t y, uint32_t z, tsample_t sample) |
| 14 |
|
| 15 |
Description |
| 16 |
----------- |
| 17 |
|
| 18 |
Return the data for the tile *containing* the specified coordinates. The |
| 19 |
data placed in *buf* are returned decompressed and, typically, in the |
| 20 |
native byte- and bit-ordering, but are otherwise packed (see further |
| 21 |
below). The buffer must be large enough to hold an entire tile of data. |
| 22 |
Applications should call the routine :c:func:`TIFFTileSize` to find out |
| 23 |
the size (in bytes) of a tile buffer. The *x* and *y* parameters are |
| 24 |
always used by :c:func:`TIFFReadTile`. The *z* parameter is used if the |
| 25 |
image is deeper than 1 slice (``ImageDepth`` > 1). The *sample* |
| 26 |
parameter is used only if data are organized in separate planes ( |
| 27 |
``PlanarConfiguration`` = 2). |
| 28 |
|
| 29 |
Notes |
| 30 |
----- |
| 31 |
|
| 32 |
The library attempts to hide bit- and byte-ordering differences between |
| 33 |
the image and the native machine by converting data to the native machine |
| 34 |
order. Bit reversal is done if the ``FillOrder`` tag is opposite to the |
| 35 |
native machine bit order. 16- and 32-bit samples are automatically |
| 36 |
byte-swapped if the file was written with a byte order opposite to the |
| 37 |
native machine byte order. |
| 38 |
|
| 39 |
Return values |
| 40 |
------------- |
| 41 |
|
| 42 |
:c:func:`TIFFReadTile` returns -1 if it detects an error; otherwise the |
| 43 |
number of bytes in the decoded tile is returned. |
| 44 |
|
| 45 |
Diagnostics |
| 46 |
----------- |
| 47 |
|
| 48 |
All error messages are directed to the :c:func:`TIFFErrorExtR` routine. |
| 49 |
|
| 50 |
See also |
| 51 |
-------- |
| 52 |
|
| 53 |
:doc:`TIFFtile` (3tiff), |
| 54 |
:doc:`TIFFOpen` (3tiff), |
| 55 |
:doc:`TIFFReadEncodedTile` (3tiff), |
| 56 |
:doc:`TIFFReadRawTile` (3tiff), |
| 57 |
:doc:`libtiff` (3tiff) |