TIFFSTRILEQUERY(3tiff)
β¨ TIFFSTRILEQUERY β¨ (3tiff)
okay bestie, welcome to the LibTIFF corner of the manual, where we talk about strile stuff π (a "strile" is a strip or a tile, and yes the name is a little cursed, we love her anyway π«Ά)
π NAME π
TIFFStrileQuery β get that strile byte count and offset, fr fr π
πΈ SYNOPSIS πΈ
#include <tiffio.h>
uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile);
uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile);
uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, int *pbErr);
uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, int *pbErr);
π¦ DESCRIPTION π¦
So the whole point of this glow-up: deferred strile offset/bytecount loading is now a runtime thing, and you also get per-strile offset/bytecount loading. Part of this commit makes the behaviour you used to only get when libtiff was compiled with -DDEFER_STRILE_LOAD available in default builds. no cap β¨
When you pass the new D (Deferred) TIFFOpen() flag, the loading of strile offset/bytecount is deferred. In that mode, the StripOffsets / StripByteCounts or TileOffsets / TileByteCounts arrays are only loaded when first accessed. This can speed-up the opening of files stored on the network when just metadata retrieval is needed. it's giving "I just wanna peek at the metadata bestie, I don't need the whole art piece" π
Another addition is the capability of loading only the values of the offset/bytecount of the strile of interest instead of the whole array. This is enabled with the new O (Ondemand) flag of TIFFOpen() (which implies D). obsessed. π
The public TIFFGetStrileOffset(), TIFFGetStrileOffsetWithErr(), TIFFGetStrileByteCount() and TIFFGetStrileByteCountWithErr() functions have been added to the API. They are of particular interest when using sparse files (with offset == bytecount == 0) and you want to detect if a strile is present or not without decompressing the data, or updating an existing sparse file. main character energy, honestly π
Let's go one by one:
TIFFGetStrileByteCount()β returns the value of theTileByteCounts/StripByteCountsarray for the specified tile/strile. literally just hands you the number π«TIFFGetStrileByteCountWithErr()β same vibe, but it additionally providespbErras anintpointer to an error return variable, which is set to"0"for successful return or to"1"for an error return. π«ΆTIFFGetStrileOffset()β returns the value of theTileOffsets/StripOffsetsarray for the specified tile/strile. the address, the location, the where πTIFFGetStrileOffsetWithErr()β you guessed it, it additionally providespbErras anintpointer to an error return variable, which is set to"0"for successful return or to"1"for an error return. π
π DIAGNOSTICS π
All error messages are directed to the TIFFErrorExtR() routine. Likewise, warning messages are directed to the TIFFWarningExtR() routine. so if something goes sideways, that's where it's yelling from π£
β NOTE β
This functionality was introduced with libtiff 4.1. so if you're on something older, bestie, it's not gonna work and it's not you, it's the version π
π SEE ALSO π
libtiff(3tiff)TIFFOpen(3tiff)TIFFDeferStrileArrayWriting(3tiff)
π AUTHOR π
LibTIFF contributors π§
π COPYRIGHT π
1988-2025, LibTIFF contributors
and that's the whole page, bestie!! this was page 4.7, dated Jun 27, 2026, brought to you by the LibTIFF girlies β¨ slay, go read your striles, periodt π
π¦ 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