| 1 |
TIFFtile |
| 2 |
======== |
| 3 |
|
| 4 |
Synopsis |
| 5 |
-------- |
| 6 |
|
| 7 |
.. highlight:: c |
| 8 |
|
| 9 |
:: |
| 10 |
|
| 11 |
#include <tiffio.h> |
| 12 |
|
| 13 |
.. c:function:: void TIFFDefaultTileSize(TIFF* tif, uint32_t* tw, uint32_t* th) |
| 14 |
|
| 15 |
.. c:function:: tsize_t TIFFTileSize(TIFF* tif) |
| 16 |
|
| 17 |
.. c:function:: uint64_t TIFFTileSize64(TIFF* tif) |
| 18 |
|
| 19 |
.. c:function:: tsize_t TIFFTileRowSize(TIFF* tif) |
| 20 |
|
| 21 |
.. c:function:: uint64_t TIFFTileRowSize64(TIFF* tif) |
| 22 |
|
| 23 |
.. c:function:: tsize_t TIFFVTileSize(TIFF* tif, uint32_t nrows) |
| 24 |
|
| 25 |
.. c:function:: uint64_t TIFFVTileSize64(TIFF* tif, uint32_t nrows) |
| 26 |
|
| 27 |
.. c:function:: ttile_t TIFFComputeTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, tsample_t sample) |
| 28 |
|
| 29 |
.. c:function:: int TIFFCheckTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, tsample_t sample) |
| 30 |
|
| 31 |
.. c:function:: ttile_t TIFFNumberOfTiles(TIFF* tif) |
| 32 |
|
| 33 |
Description |
| 34 |
----------- |
| 35 |
|
| 36 |
:c:func:`TIFFDefaultTileSize` returns the pixel width and height of a |
| 37 |
reasonable-sized tile; suitable for setting up the ``TileWidth`` and |
| 38 |
``TileLength`` tags. If the *tw* and *th* values passed in are |
| 39 |
non-zero, then they are adjusted to reflect any compression-specific |
| 40 |
requirements. The returned width and height are constrained to be a |
| 41 |
multiple of 16 pixels to conform with the TIFF specification. |
| 42 |
|
| 43 |
:c:func:`TIFFTileSize` returns the equivalent size for a tile of data |
| 44 |
as it would be returned in a call to :c:func:`TIFFReadTile` or as it |
| 45 |
would be expected in a call to :c:func:`TIFFWriteTile`. |
| 46 |
:c:func:`TIFFTileSize64` returns a :c:type:`uint64_t` number. |
| 47 |
If an error occurs, 0 is returned. |
| 48 |
|
| 49 |
:c:func:`TIFFVTileSize` returns the number of bytes in a row-aligned |
| 50 |
tile with *nrows* of data. |
| 51 |
:c:func:`TIFFVTileSize64` returns a :c:type:`uint64_t` number. |
| 52 |
If an error occurs, 0 is returned. |
| 53 |
|
| 54 |
:c:func:`TIFFTileRowSize` returns the number of bytes of a row of data |
| 55 |
in a tile. |
| 56 |
:c:func:`TIFFTileRowSize64` returns a :c:type:`uint64_t` number. |
| 57 |
If an error occurs, 0 is returned. |
| 58 |
|
| 59 |
:c:func:`TIFFComputeTile` returns the tile that contains the specified |
| 60 |
coordinates. A valid tile is always returned; out-of-range coordinate |
| 61 |
values are clamped to the bounds of the image. The *x* and *y* |
| 62 |
parameters are always used in calculating a tile. The *z* |
| 63 |
parameter is used if the image is deeper than 1 slice |
| 64 |
(``ImageDepth`` > 1). |
| 65 |
The *sample* parameter is used only if data are organized in separate |
| 66 |
planes (``PlanarConfiguration`` = 2). |
| 67 |
|
| 68 |
:c:func:`TIFFCheckTile` returns a non-zero value if the supplied |
| 69 |
coordinates are within the bounds of the image and zero otherwise. The |
| 70 |
*x* parameter is checked against the value of the ``ImageWidth`` tag. |
| 71 |
The *y* parameter is checked against the value of the ``ImageLength`` |
| 72 |
tag. The *z* parameter is checked against the value of the |
| 73 |
``ImageDepth`` tag (if defined). The *sample* parameter is checked |
| 74 |
against the value of the ``SamplesPerPixel`` parameter if the data are |
| 75 |
organized in separate planes. |
| 76 |
|
| 77 |
:c:func:`TIFFNumberOfTiles` returns the number of tiles in the image. |
| 78 |
|
| 79 |
Diagnostics |
| 80 |
----------- |
| 81 |
|
| 82 |
None. |
| 83 |
|
| 84 |
See also |
| 85 |
-------- |
| 86 |
|
| 87 |
:doc:`TIFFReadEncodedTile` (3tiff), |
| 88 |
:doc:`TIFFReadRawTile` (3tiff), |
| 89 |
:doc:`TIFFReadTile` (3tiff), |
| 90 |
:doc:`TIFFWriteEncodedTile` (3tiff), |
| 91 |
:doc:`TIFFWriteRawTile` (3tiff), |
| 92 |
:doc:`TIFFWriteTile` (3tiff), |
| 93 |
:doc:`libtiff` (3tiff) |