TIFFTILE(3tiff)
π TIFFTILE π β the tile-related utility routines, bestie
okay so this is TIFFTILE(3tiff) from the LibTIFF crew, and if you've ever been like "wait, how big is a tile actually" β bestie, this page is literally for you. no cap. π
β¨ SYNOPSIS β¨
#include <tiffio.h>
void TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th)
tmsize_t TIFFTileSize(TIFF *tif)
uint64_t TIFFTileSize64(TIFF *tif)
tmsize_t TIFFTileRowSize(TIFF *tif)
uint64_t TIFFTileRowSize64(TIFF *tif)
tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows)
uint64_t TIFFVTileSize64(TIFF *tif, uint32_t nrows)
uint32_t TIFFComputeTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z,
uint16_t sample)
int TIFFCheckTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z,
uint16_t sample)
uint32_t TIFFNumberOfTiles(TIFF *tif)
πΈ DESCRIPTION πΈ
π the tile-sizing girlies
TIFFDefaultTileSize() hands you back the pixel width and height of a tile that's, like, a reasonable size β perfect for setting up the TileWidth and TileLength tags. and here's the tea: if the tw and th values you pass in are non-zero, they get adjusted to reflect whatever compression-specific requirements are in play. the width and height it gives back are constrained to be a multiple of 16 pixels, because the TIFF specification said so and we respect her. π
TIFFTileSize() returns the equivalent size for a tile of data β exactly as it would come back in a call to TIFFReadTile(), or as it would be expected in a call to TIFFWriteTile(). and if you want the big-girl number, TIFFTileSize64() returns a uint64_t. if an error happens? 0 comes back. π«
TIFFVTileSize() gives you the number of bytes in a row-aligned tile with nrows of data. TIFFVTileSize64() is the same vibe but returns a uint64_t. error? 0. always 0.
TIFFTileRowSize() = the number of bytes of a row of data in a tile. TIFFTileRowSize64() = that same energy, as a uint64_t. and yeah, if an error occurs, 0 is returned.
π₯ the coordinate girlies
TIFFComputeTile() returns the tile that contains the coordinates you specified. and lowkey the best part: a valid tile is always returned β out-of-range coordinate values get clamped to the bounds of the image, so she's forgiving like that. π₯°
- the
xandyparameters are always used in calculating a tile - the
zparameter is used if the image is deeper than 1 slice (ImageDepth > 1) - the
sampleparameter is used only if data are organized in separate planes (PlanarConfiguration=2)
TIFFCheckTile() returns a non-zero value if the supplied coordinates are within the bounds of the image, and zero otherwise. she's the vibe check of this whole page, fr fr. here's what she checks:
- the
xparameter is checked against the value of theImageWidthtag - the
yparameter is checked against the value of theImageLengthtag - the
zparameter is checked against the value of theImageDepthtag (if defined) - the
sampleparameter is checked against the value of theSamplesPerPixelparameter if the data are organized in separate planes
TIFFNumberOfTiles() returns the number of tiles in the image. that's it, that's the whole function, she's an icon of efficiency. π
π DIAGNOSTICS π
None.
like... none. not a single one. she said "no notes." π
π¦ SEE ALSO π¦
TIFFReadEncodedTile(3tiff)TIFFReadRawTile(3tiff)TIFFReadTile(3tiff)TIFFWriteEncodedTile(3tiff)TIFFWriteRawTile(3tiff)TIFFWriteTile(3tiff)libtiff(3tiff)
π AUTHOR π
LibTIFF contributors β the collective main character energy behind all of this. π«Ά
π COPYRIGHT π
1988-2025, LibTIFF contributors
and that's the whole page, bestie!! β¨ this was LibTIFF 4.7, dated Jun 27, 2026 β go forth and tile responsibly, you absolute legend. πππ¦
π¦ where this page comes from
- fedora 43: libtiff-devel 4.7.2-1.fc43
- fedora 43: libtiff-devel 4.7.2-1.fc43
- fedora 43: libtiff-devel 4.7.2-3.fc43 Β· libtiff
- fedora 43: libtiff-devel 4.7.2-3.fc43 Β· libtiff
- fedora 44: libtiff-devel 4.7.2-1.fc44
- fedora 44: libtiff-devel 4.7.2-1.fc44
- fedora 44: libtiff-devel 4.7.2-3.fc44 Β· libtiff
- fedora 44: libtiff-devel 4.7.2-3.fc44 Β· libtiff
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms