Changes in TIFF v4.5.1


Current Version

v4.5.1 (tag %sv4.5.1)

Previous Version


Master Download Site

Master HTTP Site #1

Master HTTP Site #2

Master HTTP Site #3

This document provides a summary of significant changes made to the software between the previous and current versions (see above). A fully-detailed change summary is provided by the ChangeLog file included in the release package and by the Git commit history:


This version will be the last one supporting most TIFF tools (except tiffinfo, tiffdump, tiffcp and tiffset), whose maintenance will be discontinued, due to the lack of contributors able to address reported security issues. Starting with libtiff v4.6.0, their source code, at this time ,will still be available in the source distribution, but they will no longer be built by default, and issues related to them will no longer be accepted in the libtiff bug tracker.


Some CMake related changes, in particular related to the CMake config file now installed, should be considered as a preview and may change in the next releases based on user feedback. See discussion in and

Major changes


Software configuration changes

  • Definition of tags reformatted (clang-format off) for better readability of tag comments in tiff.h and tif_dirinfo.c

  • Do not install libtiff-4.pc when tiff-install is reset.

  • Add versioninfo resource files for DLL and tools compiled with Windows MSVC and MINGW.

  • Disable clang-formatting for and because sensitive for CMake scripts.

  • CMake: make WebP component name compatible with upstream ConfigWebP.cmake

  • CMake: make Findliblzma with upstream CMake config file

  • CMake: FindDeflate.cmake: fix several errors (issue #%s526).

  • CMake: FindLERC.cmake: version string return added.

  • CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files


Library changes

New/improved functionalities:

  • Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make ‘H’ flag of TIFFOpen() to warn and an alias of FILLORDER_MSB2LSB. tif_lerc.c: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN.

  • Optimize relative seeking within TIFFSetDirectory() by using the learned list of IFD offsets.

  • Improve internal IFD offset and directory number map handling.

  • Behavior of TIFFOpen() mode “r+” in the Windows implementation adjusted to that of Linux.

API/ABI breaks:

  • None

Bug fixes:

  • TIFFDirectory td_fieldsset type changed from unsigned long, which can be 32 or 64 bits, to uint32_t (fixes issue #%s484).

  • tif_ojpeg.c: checking for division by zero (fixes issue #%s554).

  • LZWDecode(): avoid crash when trying to read again from a strip whith a missing end-of-information marker (fixes issue #%s548).

  • Fixed runtime error: applying zero offset to null pointer in countInkNamesString().

  • Fixing crash in TIFFUnlinkDirectory() when called with directory number zero (“TIFFUnlinkDirectory(0)”) as well as fixing incorrect behaviour when unlinking the first directory.

  • tif_luv: check and correct for NaN data in uv_encode() (issue #%s530).

  • TIFFClose() avoid NULL pointer dereferencing (issue #%s515).

  • tif_hash_set.c: include tif_hash_set.h after tif_config.h to let a chance for GDAL symbol renaming trick.

  • Fax3: fix failure to decode some fax3 number_of_images and add test for Fax3 decoding issues (issue #%s513).

  • TIFFSetDirectory() and TIFFWriteDirectorySec() avoid harmless unsigned-integer-overflow (due to gdal oss-fuzz #54311 and #54343).

  • tif_ojpeg.c: fix issue #%s554 by checking for division by zero in OJPEGWriteHeaderInfo().

  • LZWDecode(): avoid crash when trying to read again from a strip whith a missing end-of-information marker (issue #%s548).


  • mention TIFFSetTagExtender() cannot add tags to custom directories.

  • manpage: add multi page TIFF and SubIFDs description and read / write example.

Tools changes

New/improved functionality:

  • None

Bug fixes:

Contributed software changes