TIFFSTRIP(3tiff)

πŸ’– TIFFSTRIP πŸ’–

okay bestie, you found the strip-related utility routines page from LibTIFF and honestly? it's a whole vibe. this is the family of functions that deal with strips β€” you know, those little horizontal slices TIFF uses to store your image data. come sit with me, we're gonna go through every single one πŸŽ€


✨ SYNOPSIS ✨

#include <tiffio.h>

uint32_t TIFFDefaultStripSize(TIFF *tif, uint32_t estimate)

tmsize_t TIFFStripSize(TIFF *tif)

uint64_t TIFFStripSize64(TIFF *tif)

tmsize_t TIFFVStripSize(TIFF *tif, uint32_t nrows)

uint64_t TIFFVStripSize64(TIFF *tif, uint32_t nrows)

tmsize_t TIFFRawStripSize(TIFF *tif, uint32_t strip)

uint64_t TIFFRawStripSize64(TIFF *tif, uint32_t strip)

uint32_t TIFFComputeStrip(TIFF *tif, uint32_t row, uint16_t sample)

uint32_t TIFFNumberOfStrips(TIFF *tif)

int TIFFSetupStrips(TIFF *tif)

like look at that list. nine functions. all of them your little strip besties 🫢


🌸 DESCRIPTION 🌸

πŸŽ€ TIFFDefaultStripSize()

this one is the ✨planner✨ of the group. TIFFDefaultStripSize() hands you back the number of rows for a reasonable-sized strip, based on whatever the current settings of the ImageWidth, BitsPerSample and SamplesPerPixel tags are, plus any compression-specific requirements in play.

if the estimate parameter is non-zero, it gets treated as an estimate of the strip size you want, and then it gets adjusted according to any compression-specific requirements. so it's like, you give it a guess and it makes your guess make sense πŸ’…

the value it returns is typically what you'd use to define the RowsPerStrip tag. and when there are no unusual requirements? TIFFDefaultStripSize tries to create strips that have approximately 8 kilobytes of uncompressed data. cute, consistent, iconic.

πŸ¦‹ TIFFStripSize()

returns the equivalent size for a strip of data as it would be returned in a call to TIFFReadEncodedStrip(), or as it would be expected in a call to TIFFWriteEncodedStrip().

if an error occurs, 0 is returned. no drama, just zero.

πŸ¦‹ TIFFStripSize64()

same energy as above, but it returns the equivalent size for a strip of data as a uint64_t.

error? 0 is returned.

🌈 TIFFVStripSize()

returns the number of bytes in a strip with nrows rows of data.

if an error occurs, 0 is returned.

🌈 TIFFVStripSize64()

returns the number of bytes in a strip with nrows rows of data, as a uint64_t.

if an error occurs, 0 is returned.

πŸ“ TIFFRawStripSize()

returns the number of bytes in a raw strip β€” and by raw I mean not decoded. the unglamorous, straight-out-of-the-file version.

if an error occurs, 0xFFFFFFFF (that's =(tmsize_t(-1))) is returned. note that it's a sentinel, not a size, so don't go treating it like a real number bestie 😭

πŸ“ TIFFRawStripSize64()

returns the number of bytes in a raw strip as a uint64_t.

if an error occurs, 0xFFFFFFFF (that's =(uint64_t(-1))) is returned.

πŸ‘‘ TIFFComputeStrip()

returns the strip that contains the specified coordinates. and here's the slay part: a valid strip is always returned β€” out-of-range coordinate values get clamped to the bounds of the image. no error path, no tears.

the row parameter is always used in calculating a strip. the sample parameter is used only if data are organized in separate planes (PlanarConfiguration = 2). iykyk.

πŸ’œ TIFFNumberOfStrips()

returns the number of strips in the image. that's it. that's the whole function. periodt.

🧚 TIFFSetupStrips()

setup or reset strip parameters and strip array memory. it's giving "let me get my lil strip situation in order" ✨


πŸ’€ DIAGNOSTICS πŸ’€

None.

literally none. nothing to report. silence. the calmest section in any manpage ever.


🌈 SEE ALSO 🌈

  • TIFFReadEncodedStrip (3tiff)
  • TIFFReadRawStrip (3tiff)
  • TIFFWriteEncodedStrip (3tiff)
  • TIFFWriteRawStrip (3tiff)
  • libtiff (3tiff)

go read those next bestie, they're all in the same friend group πŸ’–


🫢 AUTHOR 🫢

LibTIFF contributors

1988-2025, LibTIFF contributors


okay that's the whole page, you ate that reading session fr fr πŸ’… and just so you know where all this came from: it's LibTIFF version 4.7, dated Jun 27, 2026, and the manual page itself is TIFFSTRIP(3tiff). that's your sign-off, mwah πŸŽ€βœ¨