.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TIFFSTRILEQUERY" "3tiff" "Nov 26, 2023" "4.6" "LibTIFF" .SH NAME TIFFStrileQuery \- get strile byte count and offset .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile); .UNINDENT .INDENT 0.0 .TP .B uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile); .UNINDENT .INDENT 0.0 .TP .B uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, int *pbErr); .UNINDENT .INDENT 0.0 .TP .B uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, int *pbErr); .UNINDENT .SH DESCRIPTION .sp Make defer strile offset/bytecount loading available at runtime and add per\-strile offset/bytecount loading capabilities. Part of this commit makes the behaviour that was previously met when \fBlibtiff\fP was compiled with \fB\-DDEFER_STRILE_LOAD\fP available for default builds. .sp When specifying the new \fBD\fP (Deferred) \fI\%TIFFOpen()\fP flag, the loading of strile offset/bytecount is defered. In that mode, the \fBStripOffsets\fP / \fBStripByteCounts\fP or \fBTileOffsets\fP / \fBTileByteCounts\fP 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. .sp 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 \fBO\fP (Ondemand) flag of \fI\%TIFFOpen()\fP (which implies \fBD\fP). .sp The public \fI\%TIFFGetStrileOffset()\fP, \fI\%TIFFGetStrileOffsetWithErr()\fP, \fI\%TIFFGetStrileByteCount()\fP and \fI\%TIFFGetStrileByteCountWithErr()\fP functions have been added to API. They are of particular interest when using sparse files (with \fBoffset == bytecount == 0\fP) and you want to detect if a strile is present or not without decompressing the data, or updating an existing sparse file. .sp \fI\%TIFFGetStrileByteCount()\fP returns the value of the TileByteCounts / StripByteCounts array for the specified tile/strile. .sp \fI\%TIFFGetStrileByteCountWithErr()\fP additionally provides \fIpbErr\fP as an \fIint\fP pointer to an error return variable, which is set to \(dq0\(dq for successful return or to \(dq1\(dq for an error return. .sp \fI\%TIFFGetStrileOffset()\fP returns the value of the TileOffsets / StripOffsets array for the specified tile/strile. .sp \fI\%TIFFGetStrileOffsetWithErr()\fP additionally provides \fIpbErr\fP as an \fIint\fP pointer to an error return variable, which is set to \(dq0\(dq for successful return or to \(dq1\(dq for an error return. .SH DIAGNOSTICS .sp All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. .SH SEE ALSO .sp \fI\%libtiff\fP (3tiff), \fI\%TIFFOpen\fP (3tiff), \fI\%TIFFDeferStrileArrayWriting\fP (3tiff) .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2023, LibTIFF contributors .\" Generated by docutils manpage writer. .