#12729 closed enhancement (fixed)


Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 9.1
Component: BOOK Version: SVN
Severity: normal Keywords:


New minor version.

Change History (3)

comment:1 by Bruce Dubbs, 21 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:2 by Bruce Dubbs, 21 months ago


  • 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 libtiff was compiled with -DDEFER_STRILE_LOAD available for default builds when specifying the new 'D' (Deferred) TIFFOpen() flag. In that mode, the [Tile/Strip][ByteCounts/Offsets] 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. 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'). The public TIFFGetStrileOffset[WithErr]() and TIFFGetStrileByteCount[WithErr]() functions have been added to 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.
  • The BigTIFF writer now optimizes file size by using 32-bit LONG values (rather than 64-bit) where it is reasonable and safe to do so. Likewise, the 16-bit SHORT type is used when possible for StripByteCounts/TileByteCounts.


  • The WIN32 build now uses tif_win32.c when building with CMake.
  • Properly set value of HOST_FILLORDER to LSB2MSB for Windows CMake builds. It was not being properly set!


  • Changes in the libtiff library may be viewed on-line at Libtiff Library Commits.
  • New function TIFFReadFromUserBuffer() which replaces the use of TIFFReadEncodedStrip()/TIFFReadEncodedTile() when the user can provide the buffer for the input data, for example when he wants to avoid libtiff to read the strile offset/count values from the [Strip|Tile][Offsets/ByteCounts] array.
  • New functions TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting() Those advanced writing functions must be used in a particular sequence to make their intended effect. Their aim is to control when/where the [Strip/Tile][Offsets/ByteCounts] arrays are written into the file. The purpose of this is to generate 'cloud-optimized geotiff' files where the first KB of the file only contain the IFD entries without the potentially large strile arrays. Those are written afterwards.

comment:3 by Bruce Dubbs, 21 months ago

Resolution: fixed
Status: assignedclosed

Fixed at revision 22357.

Note: See TracTickets for help on using tickets.