LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
Functions
Strile offsets and byte counts

Query logical strip/tile metadata with eager or deferred loading. More...

Collaboration diagram for Strile offsets and byte counts:

Functions

uint64_t TIFFGetStrileOffset (TIFF *tif, uint32_t strile)
 Query one logical strile file offset.
 
uint64_t TIFFGetStrileByteCount (TIFF *tif, uint32_t strile)
 Query one logical strile byte count.
 
uint64_t TIFFGetStrileOffsetWithErr (TIFF *tif, uint32_t strile, int *pbErr)
 Query one logical strile file offset.
 
uint64_t TIFFGetStrileByteCountWithErr (TIFF *tif, uint32_t strile, int *pbErr)
 Query one logical strile byte count.
 

Detailed Description

Query logical strip/tile metadata with eager or deferred loading.

Function Documentation

◆ TIFFGetStrileByteCount()

uint64_t TIFFGetStrileByteCount ( TIFF *  tif,
uint32_t  strile 
)
extern

Query one logical strile byte count.

Reads cached metadata, possibly allocating/growing both offset/count caches and seeking/reading pages or full arrays. Loading can invalidate previously borrowed array pointers. Invalid indices fail without a diagnostic; malformed entries, I/O, and allocation may dispatch diagnostics. Cache failures can be destructive and can store a zero value; a later call can observe the cached zero without repeating the original error. Logical strip chopping may make these values differ from the stored IFD arrays. Does not decode pixels or validate that the returned range is readable. No ownership transfers. Zero is ambiguous; use the WithErr variant for errors detected by the current call.

Parameters
[in,out]tifNon-NULL live handle with matching schema/state; serialise access externally.
[in]strileZero-based strip or tile index below the current logical strile count, including sample planes.
Returns
Value in file bytes, or zero on detected failure; zero can also be legitimate metadata. A fill error can accompany a nonzero cached value in the WithErr variant.

Definition at line 10587 of file tif_dirread.c.

References TIFFGetStrileByteCountWithErr().

Referenced by _TIFFReadEncodedTileAndAllocBuffer(), allocChoppedUpStripArrays(), ByteCountLooksBad(), ChopUpSingleUncompressedStrip(), JPEGFixupTagsSubsampling(), TIFFFillStrip(), TIFFFillStripPartial(), TIFFFillTile(), TIFFPrintDirectory(), TIFFRawStripSize64(), TIFFReadDirectory(), TIFFReadRawStrip(), TIFFReadRawTile(), TIFFSeek(), TIFFStartStrip(), TIFFStartTile(), and TryChopUpUncompressedBigTiff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TIFFGetStrileByteCountWithErr()

uint64_t TIFFGetStrileByteCountWithErr ( TIFF *  tif,
uint32_t  strile,
int *  pbErr 
)
extern

Query one logical strile byte count.

Reads cached metadata, possibly allocating/growing both offset/count caches and seeking/reading pages or full arrays. Loading can invalidate previously borrowed array pointers. Invalid indices fail without a diagnostic; malformed entries, I/O, and allocation may dispatch diagnostics. Cache failures can be destructive and can store a zero value; a later call can observe the cached zero without repeating the original error. Logical strip chopping may make these values differ from the stored IFD arrays. Does not decode pixels or validate that the returned range is readable. No ownership transfers. Check pbErr for this call, but it is not a persistent record of earlier cache-load errors.

Parameters
[in,out]tifNon-NULL live handle with matching schema/state; serialise access externally.
[in]strileZero-based strip or tile index below the current logical strile count, including sample planes.
[out]pbErrOptional error slot: initially zero, set to one for errors detected by this call; NULL discards status.
Returns
Value in file bytes, or zero on detected failure; zero can also be legitimate metadata. A fill error can accompany a nonzero cached value in the WithErr variant.

Definition at line 10594 of file tif_dirread.c.

References _TIFFGetStrileOffsetOrByteCountValue(), TIFFDirectory::td_stripbytecount_entry, TIFFDirectory::td_stripbytecount_p, and tiff::tif_dir.

Referenced by OJPEGReadBufferFill(), and TIFFGetStrileByteCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TIFFGetStrileOffset()

uint64_t TIFFGetStrileOffset ( TIFF *  tif,
uint32_t  strile 
)
extern

Query one logical strile file offset.

Reads cached metadata, possibly allocating/growing both offset/count caches and seeking/reading pages or full arrays. Loading can invalidate previously borrowed array pointers. Invalid indices fail without a diagnostic; malformed entries, I/O, and allocation may dispatch diagnostics. Cache failures can be destructive and can store a zero value; a later call can observe the cached zero without repeating the original error. Logical strip chopping may make these values differ from the stored IFD arrays. Does not decode pixels or validate that the returned range is readable. No ownership transfers. Zero is ambiguous; use the WithErr variant for errors detected by the current call.

Parameters
[in,out]tifNon-NULL live handle with matching schema/state; serialise access externally.
[in]strileZero-based strip or tile index below the current logical strile count, including sample planes.
Returns
Value in file bytes, or zero on detected failure; zero can also be legitimate metadata. A fill error can accompany a nonzero cached value in the WithErr variant.

Definition at line 10570 of file tif_dirread.c.

References TIFFGetStrileOffsetWithErr().

Referenced by allocChoppedUpStripArrays(), ByteCountLooksBad(), ChopUpSingleUncompressedStrip(), JPEGFixupTagsSubsampling(), TIFFFillStrip(), TIFFFillStripPartial(), TIFFFillTile(), TIFFPrintDirectory(), TIFFReadDirectory(), TIFFReadRawStrip1(), TIFFReadRawStripOrTile2(), TIFFReadRawTile1(), and TryChopUpUncompressedBigTiff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TIFFGetStrileOffsetWithErr()

uint64_t TIFFGetStrileOffsetWithErr ( TIFF *  tif,
uint32_t  strile,
int *  pbErr 
)
extern

Query one logical strile file offset.

Reads cached metadata, possibly allocating/growing both offset/count caches and seeking/reading pages or full arrays. Loading can invalidate previously borrowed array pointers. Invalid indices fail without a diagnostic; malformed entries, I/O, and allocation may dispatch diagnostics. Cache failures can be destructive and can store a zero value; a later call can observe the cached zero without repeating the original error. Logical strip chopping may make these values differ from the stored IFD arrays. Does not decode pixels or validate that the returned range is readable. No ownership transfers. Check pbErr for this call, but it is not a persistent record of earlier cache-load errors.

Parameters
[in,out]tifNon-NULL live handle with matching schema/state; serialise access externally.
[in]strileZero-based strip or tile index below the current logical strile count, including sample planes.
[out]pbErrOptional error slot: initially zero, set to one for errors detected by this call; NULL discards status.
Returns
Value in file bytes, or zero on detected failure; zero can also be legitimate metadata. A fill error can accompany a nonzero cached value in the WithErr variant.

Definition at line 10577 of file tif_dirread.c.

References _TIFFGetStrileOffsetOrByteCountValue(), TIFFDirectory::td_stripoffset_entry, TIFFDirectory::td_stripoffset_p, and tiff::tif_dir.

Referenced by OJPEGReadBufferFill(), and TIFFGetStrileOffset().

Here is the call graph for this function:
Here is the caller graph for this function: