Changelog for ghostscript: 10.07.1 -> 10.08.0 Source: tiff/doc/html-prebuilt/_sources/releases/v3.4beta007.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta016.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta018.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta024.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta028.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta029.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta031.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta032.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta033.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta034.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta035.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.4beta036.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.2.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.3.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.4.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.5.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.6beta.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.5.7.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.6.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.6.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.0alpha.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.0beta.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.0beta2.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.2.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.3.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.7.4.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.8.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.8.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.8.2.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.0beta.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.2.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.3.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.4.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v3.9.5.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.10.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.2.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.3.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.4.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.4beta.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.5.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.6.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.7.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.8.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.0.9.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.1.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.2.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.3.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.4.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.5.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.5.1.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.6.0.rst.txt, tiff/doc/html-prebuilt/_sources/releases/v4.7.0.rst.txt, tiff/doc/html-prebuilt/releases/v3.4beta007.html, tiff/doc/html-prebuilt/releases/v3.4beta016.html, tiff/doc/html-prebuilt/releases/v3.4beta018.html, tiff/doc/html-prebuilt/releases/v3.4beta024.html, tiff/doc/html-prebuilt/releases/v3.4beta028.html, tiff/doc/html-prebuilt/releases/v3.4beta029.html, tiff/doc/html-prebuilt/releases/v3.4beta031.html, tiff/doc/html-prebuilt/releases/v3.4beta032.html, tiff/doc/html-prebuilt/releases/v3.4beta033.html, tiff/doc/html-prebuilt/releases/v3.4beta034.html, tiff/doc/html-prebuilt/releases/v3.4beta035.html, tiff/doc/html-prebuilt/releases/v3.4beta036.html, tiff/doc/html-prebuilt/releases/v3.5.1.html, tiff/doc/html-prebuilt/releases/v3.5.2.html, tiff/doc/html-prebuilt/releases/v3.5.3.html, tiff/doc/html-prebuilt/releases/v3.5.4.html, tiff/doc/html-prebuilt/releases/v3.5.5.html, tiff/doc/html-prebuilt/releases/v3.5.6beta.html, tiff/doc/html-prebuilt/releases/v3.5.7.html, tiff/doc/html-prebuilt/releases/v3.6.0.html, tiff/doc/html-prebuilt/releases/v3.6.1.html, tiff/doc/html-prebuilt/releases/v3.7.0.html, tiff/doc/html-prebuilt/releases/v3.7.0alpha.html, tiff/doc/html-prebuilt/releases/v3.7.0beta.html, tiff/doc/html-prebuilt/releases/v3.7.0beta2.html, tiff/doc/html-prebuilt/releases/v3.7.1.html, tiff/doc/html-prebuilt/releases/v3.7.2.html, tiff/doc/html-prebuilt/releases/v3.7.3.html, tiff/doc/html-prebuilt/releases/v3.7.4.html, tiff/doc/html-prebuilt/releases/v3.8.0.html, tiff/doc/html-prebuilt/releases/v3.8.1.html, tiff/doc/html-prebuilt/releases/v3.8.2.html, tiff/doc/html-prebuilt/releases/v3.9.0.html, tiff/doc/html-prebuilt/releases/v3.9.0beta.html, tiff/doc/html-prebuilt/releases/v3.9.1.html, tiff/doc/html-prebuilt/releases/v3.9.2.html, tiff/doc/html-prebuilt/releases/v3.9.3.html, tiff/doc/html-prebuilt/releases/v3.9.4.html, tiff/doc/html-prebuilt/releases/v3.9.5.html, tiff/doc/html-prebuilt/releases/v4.0.0.html, tiff/doc/html-prebuilt/releases/v4.0.1.html, tiff/doc/html-prebuilt/releases/v4.0.10.html, tiff/doc/html-prebuilt/releases/v4.0.2.html, tiff/doc/html-prebuilt/releases/v4.0.3.html, tiff/doc/html-prebuilt/releases/v4.0.4.html, tiff/doc/html-prebuilt/releases/v4.0.4beta.html, tiff/doc/html-prebuilt/releases/v4.0.5.html, tiff/doc/html-prebuilt/releases/v4.0.6.html, tiff/doc/html-prebuilt/releases/v4.0.7.html, tiff/doc/html-prebuilt/releases/v4.0.8.html, tiff/doc/html-prebuilt/releases/v4.0.9.html, tiff/doc/html-prebuilt/releases/v4.1.0.html, tiff/doc/html-prebuilt/releases/v4.2.0.html, tiff/doc/html-prebuilt/releases/v4.3.0.html, tiff/doc/html-prebuilt/releases/v4.4.0.html, tiff/doc/html-prebuilt/releases/v4.5.0.html, tiff/doc/html-prebuilt/releases/v4.5.1.html, tiff/doc/html-prebuilt/releases/v4.6.0.html, tiff/doc/html-prebuilt/releases/v4.7.0.html, tiff/doc/releases/v3.4beta007.rst, tiff/doc/releases/v3.4beta016.rst, tiff/doc/releases/v3.4beta018.rst, tiff/doc/releases/v3.4beta024.rst, tiff/doc/releases/v3.4beta028.rst, tiff/doc/releases/v3.4beta029.rst, tiff/doc/releases/v3.4beta031.rst, tiff/doc/releases/v3.4beta032.rst, tiff/doc/releases/v3.4beta033.rst, tiff/doc/releases/v3.4beta034.rst, tiff/doc/releases/v3.4beta035.rst, tiff/doc/releases/v3.4beta036.rst, tiff/doc/releases/v3.5.1.rst, tiff/doc/releases/v3.5.2.rst, tiff/doc/releases/v3.5.3.rst, tiff/doc/releases/v3.5.4.rst, tiff/doc/releases/v3.5.5.rst, tiff/doc/releases/v3.5.6beta.rst, tiff/doc/releases/v3.5.7.rst, tiff/doc/releases/v3.6.0.rst, tiff/doc/releases/v3.6.1.rst, tiff/doc/releases/v3.7.0.rst, tiff/doc/releases/v3.7.0alpha.rst, tiff/doc/releases/v3.7.0beta.rst, tiff/doc/releases/v3.7.0beta2.rst, tiff/doc/releases/v3.7.1.rst, tiff/doc/releases/v3.7.2.rst, tiff/doc/releases/v3.7.3.rst, tiff/doc/releases/v3.7.4.rst, tiff/doc/releases/v3.8.0.rst, tiff/doc/releases/v3.8.1.rst, tiff/doc/releases/v3.8.2.rst, tiff/doc/releases/v3.9.0.rst, tiff/doc/releases/v3.9.0beta.rst, tiff/doc/releases/v3.9.1.rst, tiff/doc/releases/v3.9.2.rst, tiff/doc/releases/v3.9.3.rst, tiff/doc/releases/v3.9.4.rst, tiff/doc/releases/v3.9.5.rst, tiff/doc/releases/v4.0.0.rst, tiff/doc/releases/v4.0.1.rst, tiff/doc/releases/v4.0.10.rst, tiff/doc/releases/v4.0.2.rst, tiff/doc/releases/v4.0.3.rst, tiff/doc/releases/v4.0.4.rst, tiff/doc/releases/v4.0.4beta.rst, tiff/doc/releases/v4.0.5.rst, tiff/doc/releases/v4.0.6.rst, tiff/doc/releases/v4.0.7.rst, tiff/doc/releases/v4.0.8.rst, tiff/doc/releases/v4.0.9.rst, tiff/doc/releases/v4.1.0.rst, tiff/doc/releases/v4.2.0.rst, tiff/doc/releases/v4.3.0.rst, tiff/doc/releases/v4.4.0.rst, tiff/doc/releases/v4.5.0.rst, tiff/doc/releases/v4.5.1.rst, tiff/doc/releases/v4.6.0.rst, tiff/doc/releases/v4.7.0.rst Changes in TIFF v3.4beta016 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta016 (no release tag) Previous Version v3.4beta004 (no references to earlier releases exist) Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * bit order was corrected for Pentium systems * a new define, :c:macro:`HOST_BIGENDIAN`, was added for code that wants to statically use information about native cpu byte order Library changes --------------- * the G3/G4 decoder was replaced by a new one that is faster and has smaller state tables * Niles Ritter's client tag extension hooks were added * a new routine :c:func:`TIFFCurrentDirOffset` was added for applications that want to find out the file offset of a TIFF directory * the calculation of the number of strips in an image was corrected for images with certain esoteric configurations * a potential memory leak (very unlikely) was plugged * the ``TIFFReadRGBAImage`` support was completely rewritten and new, more flexible support was added for reading images into a fixed-format raster * YCbCr to RGB conversion done in the :c:func:`TIFFReadRGBAImage` support was optimized * a bug in JPEG support calculation of strip size was corrected * the LZW decoder was changed to initialize the code table to zero to lessen potential problems that arise when invalid data is decoded * :c:func:`tiffcomp.h` is now aware of OS/2 * some function prototypes in :file:`tiffio.h` and :file:`tiffiop.h` that contained parameter names have been changed to avoid complaints from certain compilers Portability support changes --------------------------- * :file:`Makefile.in` has been corrected to use the parameters chosen by the :program:`configure` script Tools changes ------------- * :program:`fax2ps` has been rewritten and moved over from the user contributed software * an uninitialized variable in :program:`pal2rgb` has been fixed * :program:`ras2tiff` now converts 24-bit RGB raster data so that samples are written in the proper order * :program:`tiff2ps` has been updated to include fixes and enhancements from Alberto Accomazzi * :program:`tiffcp` now has a "``-o``" option to select a directory by file offset * :program:`tiffinfo` is now capable of displaying the raw undecoded image data in a file * :program:`tiffgt` has been rewritten to use the new ``TIFFRGBAImage`` support and to handle multiple files Changes in TIFF v3.4beta016 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta016 (no release tag) Previous Version :doc:`v3.4beta007 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for configuring the Deflate codec * support was added for the HTML documentation * codecs that are not configured for inclusion in the library are no longer compiled Library changes --------------- * support was added for registering new codecs external to the library and for overriding the codecs that are builtin to the library * emulation support for the old ``DataType`` tag was improved * support was added for the ``SMinSampleValue`` and ``SMaxSampleValue`` tags * the library no longer ignores ``TileWidth`` and ``TileLength`` tags whose values are not a multiple of 16 (per the spec); this permits old, improperly written, images to be read * the support for the ``Predictor`` tag was placed in a reusable module so that it can be shared by multiple codecs * experimental compression support was added for the Deflate algorithm (using the freely available zlib package) * a new routine, :c:func:`TIFFWriteBufferSetup` was added à la the routine :c:func:`TIFFReadBufferSetup` * the DSO version of the library is now statically linked with the JPEG and Deflate libraries; this means applications that link against the DSO do not also need to link against these ancillary libraries Tools changes ------------- * all the tools now use common code to process compress-oriented arguments * :program:`tiffdump` should now compile on a Macintosh with MPW Documentation changes --------------------- * everything was updated Contributed software changes ---------------------------- * :file:`contrib/dbs/xtiff` was made to compile * :file:`contrib/mac-mpw` is new support for compiling the software on a Macintosh under MPW * :file:`contrib/tags` is information on how to use the tag extenion facilities; consult :file:`contrib/tags/README` for details Changes in TIFF v3.4beta018 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta018 (no release tag) Previous Version :doc:`v3.4beta016 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * configure now recognizes IRIX 6.x systems * configure now uses ``ENVOPTS`` when searching for an ANSI C compiler; this fixes a problem configuring the software under HP/UX with the native C compiler * configure now correctly recognizes memory-mapped files are supported under AIX Library changes --------------- * ``make install`` now properly installs the include files * some portability fixes from Bjorn Brox * the G3/G4 codec now warns about decoded rows that are longer than the image/tile width * changes from Frank Cringle to make the library work with the gcc-specific bounds checking software * miscellaneous fixes to :c:func:`TIFFPrintDirectory` * bug fix to correct a problem where :c:func:`TIFFWriteRawStrip` could not be used to automatically grow an image's length Tools changes ------------- * fixes from Frank Cringle to update :program:`fax2tiff` * portability fixes to :program:`tiff2bw` and :program:`tiffcmp` * :program:`tiffdump` now uses the byte swapping routines in the library Changes in TIFF v3.4beta024 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta024 (no release tag) Previous Version :doc:`v3.4beta018 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * It is now possible to setup the software to build only the library; :program:`configure` recognizes this is the intent when the :file:`VERSION`, :file:`tiff.alpha`, and :file:`tif_version.c` files are in the local directory (i.e. :file:`.`) * :program:`configure` no longer tries to setup HTML materials * include file directories needed in building the library are now specified with a ``DIRS_LIBINC`` config parameter * configure no longer checks for alternate compilers if ``CC`` is set; if the specified compiler is not found or is not appropriate the configuration procedure aborts * the :file:`port.h` file generated by configure is now used only by the library and as such as have been moved to the :file:`libtiff` directory * there is beginning support for building DSO's on systems other than IRIX * configure now verifies the JPEG and zlib directory pathnames by checking for well-known include files in these directories * configure no longer creates the :file:`dist` directory needed only on SGI machines (for building SGI binary distributions) * a bug was fixed whereby configure would incorrectly set ``ENVOPTS`` when building the software with gcc under AIX Library changes --------------- * two new typedefs were added to :file:`tiff.h`: :c:type:`int8` and :c:type:`uint8` for signed and unsigned 8-bit quantities, respectively; these are currently used only by programs in the :file:`tools` directory * the ``BadFaxLines``, ``CleanFaxData``, and ``ConsecutiveBadFaxLines`` tags are now supported with Group 4 compression * byte order is now correctly identified on 64-bit machines * a bug was fixed in the PackBits decoder where input data would appear short when a no-op run was present * a bug was fixed in calculations with very wide strips * :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteRawStrip` were extended to support dynamically growing the number of strips in an image (must set ``ImageLength`` prior to making calls though) * :c:func:`TIFFDefaultTileSize` now rounds tile width and height up to a multiple of 16 pixels, as required by the TIFF 6.0 specification * the file :file:`version.h` is now built by a new :program:`mkversion` program; this was done for portability to non-UNIX systems * support was added for the Acorn RISC OS (from Peter Greenham) * the builtin codec table is now made ``const`` when compiling under VMS so that :file:`libtiff` can be built as a shared library * support for the PowerPC Mac (from Ruedi Boesch) * support for Windows NT/Windows 95 (from Scott Wagner) Tools changes ------------- * the tools no longer include :file:`port.h` * various portability fixes; mostly to eliminate implicit assumptions about how long :c:type:`int32` data types are * PostScript Level II additions to :program:`tiff2ps` from Bjorn Brox * :program:`sgi2tiff` now handles RGBA images Documentation changes --------------------- * the documentation has been updated to reflect the current state of the software * some routines have been moved to different manual pages to group like-routines together Contributed software changes ---------------------------- * support was added for the Acorn RISC OS (from Peter Greenham) * support for Windows NT/Windows 95 contributed for a previous version of this software was sort of incorporated (it's broken right now) (from Scott Wagner) Changes in TIFF v3.4beta028 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta028 (no release tag) Previous Version :doc:`v3.4beta024 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * a "``-noninteractive``" flag was added to configure to control whether or not it prints and prompts for configuration information * various typos and fixes were made in configure for the the library-only build support (this and other configure fixes from `Richard Mlynarik `_) * bugs were fixed in the handling of pathnames supplied for external packages; e.g. ``DIR_JPEG`` * the handling of ``SETMAKE`` is now done properly * the default prototype function declaration for :c:func:`pow` was corrected * a bug was fixed in :file:`libtiff/Makefile.in` that caused installation to fail on systems without DSO support Library changes --------------- * Acorn RISC O/S support that was accidentally left out of the left out of the previous distribution is present (from Peter Greenham) * complaints about unknown and/or unsupported codecs have been delayed until they are invoked; this permits applications to open images and look at tags even if the image data is compressed with an unknown/unsupported compression scheme * bugs in handling unknown tags have been corrected; applications that use multiple codecs, each with codec-specific tags, no longer generate confusing error messages * a missing pseudo-tag definition in the CCITT G3 codec was fixed (this problem caused core dumps in the :program:`tiffcp` program) * pseudo-tags are now treated specially; they are always considered to be set (i.e. they do not use bits in the ``FIELD_*`` bit-vectors). * the use of strip chopping can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``C``" to enable strip chopping and "``c``" to disable) * two bugs were fixed in the writing of opposite-endian byte-order files * support was added for three new fax-related tags registered to SGI: ``FaxRecvParams``, ``FaxRecvTime``, and ``FaxSubAddress`` * the bit order of image data read and written can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``B``" to force MSB2LSB bit order, "``L``" for LSB2MSB bit order, and "``H``" for the bit order of the native CPU) * the byte order of image and tag data written to newly-created files can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``b``" to force Big-Endian byte order and "``l``" to force Little-Endian byte order) * the use memory-mapped files for images opened read-only can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``M``" to enable use of memory-mapped files and "``m``" to disable use) * the use of the :c:macro:`WIN32` define in :file:`tiffiop.h` has been replaced by :c:macro:`__WIN32__` Tools changes ------------- * :program:`fax2ps` now does a ``save`` and ``restore`` around each page of PostScript; this fixes a problem with VM overflow when printing a many-page document on some printers * a bug in the handling of 3-channel images by :program:`ras2tiff` was fixed * :program:`tiffcp` has new options to control the byte order of newly created files: "``-B``" for Big-Endian byte order, "``-L``" for Little-Endian byte order; a "``-M``" option to disable the use of memory-mapped files, and a "``-C``" option to disable the use of strip chopping * bugs were fixed in :program:`tiffcp` handling of codec-specific tags Documentation changes --------------------- * the :c:func:`TIFFOpen` page has been updated to reflect the new optional open mode parameters Contributed software changes ---------------------------- * :file:`contrib/win95` contains information and code from `Philippe Tenenhaus <100423.3705@compuserve.com>`_ about using the software under Windows 95 * :file:`contrib/winnt` contains information and code from `Dave Dyer `_ about using the software under Windows NT Changes in TIFF v3.4beta029 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta029 (no release tag) Previous Version :doc:`v3.4beta028 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :program:`configure` now relativizes pathname references given in "``-L``" options (as frequently specified when configuring ancillary packages) * problems related to configuring the software on Ultrix 4.4 have been corrected * the shell to use in Makefiles and scripts can now be set with the ``SCRIPT_SH`` configuration parameter * comments in :file:`config.site` now correctly indicate how to setup the use of ancillary packages Library changes --------------- * mods for building the software on a Mac using the MetroWerks CodeWarrior compilers * a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in a strip/tile might not be decoded; this was seen only when decoding multi-strip images * a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not being properly registered Contributed software changes ---------------------------- * :file:`contrib/mac-cw` contains information and code from `Niles Ritter `_ about building the software with the MetroWerks CodeWarrior compilers on Macintosh systems Changes in TIFF v3.4beta031 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta031 (no release tag) Previous Version :doc:`v3.4beta029 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :program:`configure` now captures significantly more information in the :file:`config.log` file and provides more information when it is unable to setup a configuration * support was added for building shared libraries on more systems: AIX, HPUX, Solaris, and Linux. * a new configuration parameter ``LIBCOPTS`` was added for passing arguments to the C compiler to use when building only the library; this is part of the enhanced support for building shared libraries * include files for optional packages that reside in :file:`/usr/include` are now handled correctly * build trees may now be configured using either relative or absolute pathnames to the source distribution * several new configuration parameters were added, mainly for building shared libraries: ``DIST_MAJOR``, ``DIST_MINOR``, ``DIST_ALPHA``, and ``DSOSUF_VERSION`` Library changes --------------- * the Deflate support has been revised: it requires version 0.99 of the zlib software distribution, **the output format has changed and is incompatible with previous versions of this library** (each strip now includes a header read and written by the zlib library) * the codec name printed by the :c:func:`TIFFPrintDirectory` routine is now taken from the codec table instead of from a builtin table; this means that application-defined codecs are handled correctly * a new symbol was added that contains the library version number; this can be used to do a compile-time compatibility check of the library version Documentation changes --------------------- * the creation and installation of manual pages was redone; it now implements the documented "configuration scheme" Changes in TIFF v3.4beta032 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta032 (no release tag) Previous Version :doc:`v3.4beta031 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * various fixups and subtle improvements to :program:`configure` from Richard Mlynarik Library changes --------------- * a new codec from Pixar designed for high-resolution color images; note that this codec is not configured by default * a bug fix for reading tags with a single ``FLOAT`` value * change to the :c:func:`TIFFGetField` calling convention: a tag that has a single value of type ``DOUBLE`` is now retrieved by passing a ``double*`` instead of a ``double**`` (this change makes the handling of tags with ``DOUBLE`` values identical to the handling of tags with ``FLOAT`` values) * fix to VMS support for the handling of floating point values Tools changes ------------- * :program:`tiffdump` now handles tags with ``FLOAT`` and ``DOUBLE`` values Contributed software changes ---------------------------- * updates to the Acorn OS support from Peter Greenham Changes in TIFF v3.4beta033 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta033 (aka the v3.4 release) (no release tag) Previous Version :doc:`v3.4beta032 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for building the library as a DSO under OSF/1 Library changes --------------- * fixes to the Pixar codec * portability mods for VMS Tools changes ------------- * fixes to :program:`gif2tiff` and :program:`ppm2tiff` for building under MS/DOS * portability mods to :program:`fax2ps` and :program:`ycbcr` for VMS Contributed software changes ---------------------------- * a new package from Alexander Lehmann for building the library and tools under MS/DOS with DJGPP v2 * updated VMS support from Karsten Spang Changes in TIFF v3.4beta034 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta034 (no release tag) Previous Version :doc:`v3.4beta033 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for building the library as a DSO under NetBSD * a bug was fixed in the DSO support for Linux * the handling of version strings has changed slightly to simplify parsing * a new parameter, ``TIFFLIBREF``, was added to control how the library is referenced when linking programs in the :file:`tools` directory Library changes --------------- * DSO creation under Solaris now forces the DSO name with a ``-h`` option * the interface to the :program:`mkversion` program was changed to eliminate the need to parse files * a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder * ANSI IT8 TIFF/IT tag definitions were added to :file:`tiff.h` Changes in TIFF v3.4beta035 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta035 (no release tag) Previous Version :doc:`v3.4beta034 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added installing the HTML documentation * support was added for building the library as a DSO under FreeBSD Library changes --------------- * the interface to the :program:`mkversion` program was restored to the form used prior to v3.4beta034 * several portability problems for 16-bit systems were fixed Changes in TIFF v3.4beta036 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta036 (no release tag) Previous Version :doc:`v3.4beta035 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for building the library as a DSO under HP-UX with the native C compiler * tools are now built with explicit pathnames for the DSO under IRIX, Solaris, and Linux * DSO configuration support for Linux was changed to require that :file:`libc.so` only be readable (not executable) Library changes --------------- * support was add for ICC: ``NumberOfInks``, and ``ICCProfile`` * a memory leak caused by doing ``TIFFSetDirectory(0)`` was fixed * a bug was fixed whereby certain multi-directory files were not properly handled when accessed by mapping the data into memory * the strip chopping support is now always compiled into the library with the default usage controlled by a :c:macro:`STRIPCHOP_DEFAULT` configuration parameter * the strip chopping support no longer chops tiled images * all static strings are now const---for shared libraries * the logic for estimating the strip size of images without ``StripByteCounts`` tag was improved by handling ``PlanarContig`` images differently from ``PlanarSeparate`` * a bug was fixed in the G3 codec when converting the Y resolution of data specified in metric units * a bug was fixed in the G3/G4 decoder for data where lines terminate with a ``v0`` code * the ``TIFFRGBAImage`` support was changed to scale 16-bit colormap entries more conservatively to avoid problems with applications that do not generate fully saturated pixel values * the LZW decoder was changed to use a more conservative scheme when bounds checking the hash table array; this avoids pitfalls with systems that load objects into memory in unusual locations * a bug was fixed in :c:func:`TIFFPrintDirectory` handling of the ``InkNames`` tag * :c:func:`TIFFPrintDirectory` now understands ``NumberOfInks`` and ICC-related tags * the routines for reading image data now provide more useful information when a read error is encountered * support was added for compiling with Microsoft Visual C++ 4.0 Tools changes ------------- * a bug was fixed in :program:`pal2rgb` colormap handling * :program:`tiff2ps`: * now includes John Wehle's changes for maintaining the aspect ratio of images when scaling and for honoring the deadzone on a page when generating PostScript Level II * does a better job guarding against the mishandling of greyscale images * now correctly converts X- and Y-resolution values specified in metric units * :program:`tiffdump`: * has a new "``-m``" option to control the maximum number of indirect data values printed for a tag (by default 24) * understands several new tags * now shows any terminating null in ASCII strings * :program:`tiffinfo` now suppresses strip chopping when interpreting an image; a new "``-z``" option has been added to enable strip chopping Changes in TIFF v3.5.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.1 (no release tag) Previous Version v3.4beta037 (missing release notes, go to :doc:`v3.4beta036 `) Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ None. Library changes --------------- * Support was added for IPTC Newsphoto metadata (:c:macro:`TIFFTAG_IPTCNEWSPHOTO`) * Support was added for photoshop caption handling (:c:macro:`TIFFTAG_PHOTOSHOP`) Contributed software changes ---------------------------- * `Bill Radcliffe's `_ :program:`iptcutil` was added to the :file:`contrib` subdirectory . It can convert an IPTC binary blob to ASCII text and vice-versa. The blob itself can be extracted from or added to an image with the `ImageMagick `_ :program:`convert` (1) utility. Changes in TIFF v3.5.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.2 (no release tag) Previous Version :doc:`v3.5.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * Corrected alpha versioning. * Removed distinction between alpha and release targets in :file:`Makefile.in`. * Added release.stamp target, which tags cvs tree, and updates :file:`RELEASE-DATE` * Added ``releasediff`` target, which diffs tree with source as of date in :file:`RELEASE-DATE` * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving away from alpha/non-alpha distinctions). Library changes --------------- * Added IRIX/gcc, and OSF/1 4.x support on behalf of `Albert Chin-A-Young `_. * Added :c:func:`TIFFReassignTagToIgnore` API on behalf of `Bruce Cameron `_. Man page still pending. * pre-remove :file:`so` link before softlink in ``LINUXdso`` action in :file:`libtiff/Makefile.in` to avoid failure on ``LINUXdso`` builds other than the first. * Fixed problem with :c:func:`cvtcmap` in :file:`tif_getimage.c` modifying the colormaps owned by the TIFF handle itself when trying to fixup wrong (eight bit) colormaps. Corrected by maintaining a private copy of the colormap. * Added :c:func:`TIFFReadRGBATile`/:c:func:`TIFFReadRGBAStrip` support in :file:`tif_getimage.c`. * Applied "``a``" mode fix to :file:`tif_win32.c`/:c:func:`TIFFOpen` as suggested by `Christopher Lawton `_. * Set ``O_BINARY`` for :file:`tif_unix.c` :c:func:`open` ... used on cygwin for instance. * Added ``CYGWIN`` case in configure. * Applied Francois Dagand's patch to handle fax decompression bug. (sizes >= 65536 were failing) Contributed software changes ---------------------------- * Added :program:`addtiffo` (add overviews to a TIFF file) in contrib. Didn't put it in tools since part of it is in C++. Changes in TIFF v3.5.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.3 (:tag:`Release-v3-5-3`) Previous Version :doc:`v3.5.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- Please note the most important change: **LZW compression has been removed**. Unisys has the patent on LZW compression and have been very active in their enforcement of late, demanding payments of $5000 or more from websites using unlicensed software to create GIF's. They could well do the same do persons using libtiff to create LZW compressed TIFF images. From `Burn All GIF's Day `_: The catch is that it appears to be difficult or impossible to get a Unisys license to use LZW in free software that complies with the Open Source Definition Unfortunately, the removal of LZW compression means that saved image size has grown dramatically. Without a change in the TIFF spec to support another lossless compression format, this is unavoidable. The library can use zip for lossless compression, but as this is not part of the spec, TIFFs using zip compression may not work with other software. We will be making a patch available that will contain the LZW compression code for users who have either obtained a license from Unisys or are willing to risk it. LZW decompression is unchanged. Software configuration changes ------------------------------ * Added zip creation to release makefile target Library changes --------------- * Added html for :file:`TIFFWriteTile.3t` man page. * Added some changes to :file:`tif_write.c` to support rewriting existing fixed sized tiles and strips. Code mods disabled by default, only enabled if :c:macro:`REWRITE_HACK` is defined for now. * Added :file:`TIFFWriteTile.3t` man page. * Added notes on use of :file:`makefile.vc` in :file:`build.html`, and fixed email subscription address. * Did some casts cleaning up to reduce compiler warnings in :file:`tif_fax3.c`, from `Bruce Cameron `_---modifications of changes made by Frank (sun cc still complained on cast). * fixed various VC++ warnings as suggested by `Gilles Vollant `_. * Modified :file:`TIFFquery.3t` man pages info on :c:func:`TIFFIsByteSwapped` to not imply applications are responsible for image data swapping. * HTML-ized the man pages, added to :file:`html/man`. * Removed LZW Compression to comply with Unisys patent extortion. * Corrected one remaining ``16 -> 32`` bit value in :file:`tif_fax3.c`, From `Ivo Penzar `_. * Added patch from Ivo Penzar to have :c:func:`TiffAdvanceDirectory` handle memory mapped files. `Ivo Penzar `_. Contributed software changes ---------------------------- * Fixed apocalypse-inducing y2k bug in :file:`contrib/ras/ras2tiff.c` Changes in TIFF v3.5.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.4 (:tag:`Release-v3-5-4`) Previous Version :doc:`v3.5.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * None. Library changes --------------- * Added Pixar tag support. Contributed by `Phil Beffery `_. * Made one more change to :file:`tif_dir.c` for removal of LZW compression. Also added notice when LZW compression invoked. * Fixed bug that caused LZW (non) compression to segfault. Added warning about LZW compression removed being removed, and why. Tools changes ------------- * Changed default compression in tools to :c:macro:`TIFF_PACKBITS`, and changed usage descriptions in tools to reflect removal of LZW compression * Added ``nostrip`` to install in :file:`tools/Makefile.in` so that debugging symbols are kept. * Made Packbits the default compression in :file:`tools/tiff2rgba.c` instead of LZW. Changes in TIFF v3.5.5 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.5 (:tag:`Release-v3-5-5`) Previous Version :doc:`v3.5.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :file:`configure`: added test for libc6 for linux targets. Bug reported by `Stanislav Brabec `_. * :file:`configure`: fixed bugs in sed scripts (applied sed script ``s:/@:s;@:;s:/s;;:;:`` to configure). fix submitted by `Stanislav Brabec `_. * :file:`tools/iptcutil` was not in files list, and wasn't being added to tar archive. :file:`Updated Makefile.in`. * Added 3.5 docs to :file:`html/Makefile.in`. Thanks to `Stanislav Brabec `_ * Fixed :file:`tools/tiffcmp` so that ``stopondiff`` testing works. Patch care of `Joseph Orost `_. * Added :file:`fax3sm_winnt.c` to distribution list in :file:`Makefile.in`. * Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. Library changes --------------- * :file:`tif_fax3.c`: Fixed serious bug introduced during the ``uint16->uint32`` conversion for the run arrays. * Set :c:member:`td_sampleformat` default to :c:macro:`SAMPLEFORMAT_UINT` instead of :c:macro:`SAMPLEFORMAT_VOID` in :c:func:`TIFFDefaultDirectory` in :file:`tif_dir.c`. * Added "GetDefaulted" support for :c:macro:`TIFFTAG_SAMPLEFORMAT` in :file:`tif_aux.c`. * Patched :file:`tif_fax3.c` so that ``dsp->runs`` is allocated a bit bigger to avoid overruns encountered with :file:`frle_bug.tif`. * Modified :file:`tif_unix.c` to support 2-4GB seeks if :c:macro:`USE_64BIT_API` is set to 1, and added default (off) setting in :file:`tiffconf.h`. This should eventually be set by the configure script somehow. The original work on all these 2-4GB changes was done by `Peter Smith `_. * Modified :file:`tif_win32.c` to support 2-4GB seeks. * tentatively changed :c:type:`toff_t` to be unsigned instead of signed to facilitate support for 2-4GB files. * Updated a variety of files to use :c:type:`toff_t`. Fixed some mixups between :c:type:`toff_t` and :c:type:`tsize_t`. * Set :c:member:`tif_rawdatasize` to zero when freeing raw data buffer in :c:func:`TIFFWriteDirectory`. * Enabled :c:macro:`REWRITE_HACK` in :file:`tif_write.c` by default. * Fix bug in :file:`tif_write.c` when switching between reading one directory and writing to another. * Made :c:func:`TIFFWriteCheck` public, and added :c:func:`TIFFCreateDirectory` * Added :doc:`/functions/TIFFmemory` functions to :file:`libtiff.def`. * Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. Tools changes ------------- * :program:`fax2ps`: * Fixed mixup of width and height in bounding box statement as per submission by `Nalin Dahyabhai `_. * Modified :c:var:`printruns` to take :c:type:`uint32` instead of :c:type:`uint16`. Patch courtesy of `Bernt Herd `_. * Largely reimplemented :file:`contrib/addtiffo` to avoid temp files, updating the TIFF file in place. Fixed a few other bugs to. * Altered descriptions in tools to reflect "by default" lzw not supported LZW compression kit changes --------------------------- * created :file:`mangle-src.sh` -- sed scripts to munge src into LZW enabled format. Thanks to `Stanislav Brabec `_. * created :file:`Makefile` * merged :file:`tif_dir.c` with current source. * Created lzw compression kit, as a new CVS module (``libtiff-lzw-compression-kit``). * Updated :file:`index.html` to note lzw compression kit. Changes in TIFF v3.5.6beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.6beta (no release tag) Previous Version :doc:`v3.5.5 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * Added ``GNULDdso`` target and switched linux and freebsd to use it. * :file:`tools/Makefile.in`: Modified to install properly on SGI. * :file:`configure`: Fixed DSO test for Linux as per patch from `Jan Van Buggenhout `_. Library changes --------------- * :file:`tif_dir.c`: Clear :c:macro:`TIFF_ISTILED` flag in :c:macro:`TIFFDefaultDirectory` as per :bugzilla-rs:`18` from ``_. * Modified :file:`tif_packbits.c` decoding to avoid overrunning the output buffer, and to issue a warning if data needs to be discarded. See :bugzilla-rs:`18` * Modified :c:func:`TIFFClientOpen` to emit an error on an attempt to open a compressed file for update (``O_RDWR``/"``r+``") access. This is because the compressor/decompressor code gets very confused when the mode is ``O_RDWR``, assuming this means writing only. See bug :bugzilla-rs:`13` * Applied patch for 0x0000 sequences in :file:`tif_fax3.h` definition of :c:macro:`EXPAND1D` as per bug :bugzilla-rs:`11` (from Roman). * Fixed :file:`tiffcomp.h` to avoid win32 stuff if unix ``#defined``, to improve cygwin compatibility. * Applied patch from Roman Shpount to :file:`tif_fax3.c`. This seems to be a proper fix to the buffer sizing problem. See :bugzilla-rs:`11` * Fixed :file:`tif_getimage.c` to fix overrun bug with YCbCr images without downsampling. :bugzilla-rs:`10` Thanks to `Nick Lamb `_ for reporting the bug and proving the patch. * Fixed :file:`tif_jpeg.c` to avoid destroying the decompressor before we are done access data thanks to bug report from: `Michael Eckstein `_. * :file:`tif_open.c`: Don't set ``MMAP`` for ``O_RDWR`` files. * :file:`tif_open.c`: Set :c:macro:`STRIPCHOP_DEFAULT` for ``O_RDWR`` as well as ``O_RDONLY`` so that files opened for update can be strip chopped too. * :file:`tif_read.c`: fixed up bug with files missing rowsperstrip and the strips per separation fix done a few weeks ago. * Tentatively added support for :c:macro:`SAMPLEFORMAT_COMPLEXIEEEFP`, and :c:macro:`SAMPLEFORMAT_COMPLEXINT`. * :file:`index.html`, :file:`bugs.html`: added bugzilla info. * :file:`tif_read.c`: fix subtle bug with determining the number of rows for strips that are the last strip in a separation but not the last strip of all in :c:func:`TIFFReadEncodedStrip`. * Applied 16/32 bit fix to :file:`tif_fax3.c`. Fix supplied by `Peter Skarpetis `_. * Modified :file:`tiffio.h` logic with regard to including :file:`windows.h`. It won't include it when building with :c:macro:`__CYGWIN__`. * :file:`README`: update to mention {REDACTED - defunct web site}, don't list Sam's old email address. * :file:`libtiff/tif_dirread.c`: Don't use estimate strip byte count for one tile/strip images with an offset, and byte count of zero. These could be "unpopulated" images. * :file:`tif_win32.c`: Applied patch to fix overreads and ovverwrites caught by BoundsChecker. From `Arvan Pritchard `_ (untested). * :file:`tif_getimage.c`: Applied patch to silence VC6 warnings. From `Arvan Pritchard `__. * :file:`tif_lzw.c`: Applied patch to silence VC6 warnings. From `Arvan Pritchard `__. * :file:`libtiff/tif_apple.c`: Applied "Carbon" support patches supplied by `Leonard Rosenthol `_. May interfere with correct building on older systems. If so, please let me know. Tools changes ------------- * :file:`tools/rgb2ycbcr.c`: fixed output strip size to account for vertical roundup if rows_per_strip not a multiple of vertical sample size. * :file:`tools/tiffsplit.c`: Copy :c:macro:`TIFFTAG_SAMPLEFORMAT`. * Modified :program:`tiff2bw` to ensure portions add to 100%, and that white is properly recovered. See bug :bugzilla-rs:`15` Patch c/o `Stanislav Brabec `_ Contributed software changes ---------------------------- * :file:`contrib/addtiffo`: Added "averaging" resampling option. * Added :file:`contrib/stream` (stream io) code submitted by Avi Bleiweiss. LZW compression kit changes --------------------------- * updated :file:`tif_dir.c` to reflect changes to no-lzw :file:`tif_dir.c`. Changes in TIFF v3.5.7 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.7 (:tag:`Release-v3-5-7`) Previous Version :doc:`v3.5.6beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :file:`libtiff/libtiff.def`: Brent Roman submitted new version adding several missing entry points. Also add a few other entry points later. * :file:`configure`, :file:`Makefile.in`, etc: added support for ``OPTIMIZER`` being set from :file:`config.site`. * :file:`config.guess`: updated wholesale to an FSF version apparently from 1998 (as opposed to 1994). This is mainly inspired by providing for MacOS X support. * :file:`configure/config.site`: modified to check if ``-lm`` is needed for ``MACHDEPLIBS`` if not supplied by :file:`config.site`. Needed for Darwin. * :file:`libtiff/tiff.h`: Applied hack to try and resolve the problem with the :file:`inttypes.h` include file on AIX. (bug :bugzilla-rs:`39`) * :file:`configure`, :file:`*Makefile.in`: Various changes to improve configuration for HP/UX specifically, and also in general. (bug :bugzilla-rs:`40`) They include: * Try to handle :program:`/usr/bin/sh` instead of :program:`/bin/sh` where necessary. * Upgrade to HP/UX 10.x+ compiler, linker and dso options. * Fixed :c:func:`mmap` test to avoid ``MMAP_FIXED`` ... it isn't available on HP * Use ``-${MAKEFLAGS}`` in sub makes from makefiles. * Fixed ``SCRIPT_SH``/``SHELL`` handling. * :file:`configure`: Changes for DSO generation on AIX provided by `John Marquart `_. * :file:`configure`, :file:`libtiff/Makefile.in`: Modified to build DSOs properly on Darwin thanks to `Robert Krajewski `_ and `Keisuke Fujii `_. * :file:`configure`, :file:`libtiff/Makefile.in`: applied OpenBSD patches as per bug :bugzilla-rs:`61`. * :file:`Makefile.in`: added ``DESTDIR`` support as per bug :bugzilla-rs:`60`. * :file:`libtiff/tif_jpeg.c`: Define :c:macro:`HAVE_BOOLEAN` on windows if :file:`RPCNDR.H` has been included. * :file:`man/Makefile.in`: add :c:func:`TIFFClientOpen` link as per debian submitted bug :bugzilla-rs:`66`. * :file:`libtiff/Makefile.in`: Fixed ``@DSOSUB_VERSION`` to be ``@DSOSUF_VERSION@`` in two places. Library changes --------------- * :file:`tif_fax3.c`: keep :c:var:`rw_mode` flag internal to fax3 state to remember whether we are encoding or decoding. This is to ensure graceful recovery if :c:func:`TIFFClientOpen` discovers an attempt to open a compressed file for "``r+``" access, and subsequently close it, as it resets the :c:member:`tif_mode` flag to ``O_RDONLY`` in this case to avoid writes, confusing the compressor's concept of whether it is in encode or decode mode. * :file:`tif_luv.c`, :file:`tiff.h`, :file:`tiffio.h`: New version of TIFF LogLuv (SGILOG) modules contributed by `Greg Ward `_. He writes: * I improved the gamut-mapping function in :file:`tif_luv.c` for imaginary colors, because some images were being super-saturated on the input side and this resulted in some strange color shifts in the output. * I added a psuedotag in :file:`tiff.h` to control random dithering during LogLuv encoding. This is turned off by default for 32-bit LogLuv and on for 24-bit LogLuv output. Dithering improves the average color accuracy over the image. * I added a ``#define`` for :c:macro:`LOG_LUV_PUBLIC`, which is enabled by default in :file:`tiffio.h`, to expose internal routines for converting between LogLuv and XYZ coordinates. This is helpful for writing more efficient, specialized conversion routines, especially for reading LogLuv files. * :file:`libtiff/tif_dirinfo.c`: don't declare :c:var:`tiffFieldInfo` static on VMS. * Added :c:macro:`TIFFTAG_COPYRIGHT` support. * :file:`tif_getimage.c`: Added support for 16bit minisblack/miniswhite images in RGBA interface. * :file:`libtiff/tif_dirinfo.c`: removed duplicate :c:macro:`TIFFTAG_PHOTOSHOP` as per bug :bugzilla-rs:`44`. * :file:`libtiff/tif_dirwrite.c`: Added support for :c:enumerator:`TIFF_VARIABLE2` in the case of writing :c:enumerator:`TIFF_BYTE`/:c:enumerator:`TIFF_SBYTE` fields as per bug :bugzilla-rs:`43`. * :file:`libtiff/tif_dirinfo.c`: Modified the :c:enumerator:`TIFF_BYTE` definition for :c:macro:`TIFFTAG_PHOTOSHOP` to use a writecount of :c:enumerator:`TIFF_VARIABLE2` (-3) to force use of :c:type:`uint32` counts instead of :c:expr:`short` counts. * :file:`libtiff/tif_dirinfo.c`: moved pixar and copyright flags to ensure everything is in order. * Integrated experimental OJPEG support from Scott Marovich of HP. * :file:`libtiff/tif_open.c`: Seek back to zero after failed read, before writing header. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: added check for :c:macro:`__LP64__` when checking for 64 bit architectures as per bugzilla bug :bugzilla-rs:`67`. * :file:`libtiff/tif_getimage.c`: Use :c:func:`memmove` instead of :c:func:`TIFFmemcpy` in :c:func:`TIFFReadRGBATile` to avoid issues in cases of overlapping buffers. See bug :bugzilla-rs:`69` in Bugzilla. * :file:`libtiff/tif_getimage.c`: Don't complain for CMYK (separated) images with more than four samples per pixel as per bug :bugzilla-rs:`73`. * :file:`libtiff/tif_getimage.c`: relax handling of contig case where there are extra samples that are supposed to be ignored as per bug :bugzilla-rs:`75`. This should now work for 8bit greyscale or paletted images. * :file:`libtiff/tif_packbits.c`: fixed memory overrun error as per bug :bugzilla-rs:`77`. * :file:`libtiff/tif_getimage.c`: Fixed problem with reading strips or tiles that don't start on a tile boundary. Fix contributed by Josep Vallverdu (from HP), and further described in bug :bugzilla-rs:`47`. * :file:`libtif/tif_fax3.c`: Removed ``#ifdef PURIFY`` logic, and modified to always use the "safe" version, even if there is a very slight cost in performance as per bug :bugzilla-rs:`54`. * :file:`libtiff/tif_lzw.c`: added dummy :c:func:`LZWSetupEncode` to report an error about LZW not being available. * :file:`libtiff/tif_dir.c`: propagate failure to initialize compression back from :c:func:`TIFFSetField` as an error status, so applications can detect failure. * :file:`libtiff/tif_lzw.c`: Avoid MS VC++ 5.0 optimization bug as per bug :bugzilla-rs:`78`. * :file:`libtiff/tif_dirwrite.c`: added :c:func:`TIFFRewriteDirectory` function. Updated :c:func:`TIFFWriteDirectory` man page to include :c:func:`TIFFRewriteDirectory`. * :file:`libtiff/tiff.h`: I have created :c:macro:`COMPRESSION_CCITT_T4`, :c:macro:`COMPRESSION_CCITT_T6`, :c:macro:`TIFFTAG_T4OPTIONS` and :c:macro:`TIFFTAG_T6OPTIONS` aliases in keeping with TIFF 6.0 standard in :file:`tiff.h` as per bug :bugzilla-rs:`83`. * Added :c:macro:`PHOTOMETRIC_ITULAB` as per bug :bugzilla-rs:`90`. Tools changes ------------- * Brent Roman contributed updated :program:`tiffcp` utility (and :file:`tiffcp.1`) with support for extracting subimages with the ``,n`` syntax, and also adding the "``-b``" bias removal flag. * :file:`tiff2ps.c`, :file:`tiff2ps.1`: Substantial changes to :program:`tiff2ps` by Bruce A. Mallett, including a faster encoder, fixes for level 2 PostScript, and support for the imagemask operator. * fax2ps.c: Helge (libtiff at oldach.net) submitted fix that corrects behaviour for non-Letter paper sizes. (bug :bugzilla-rs:`35`) It fixes two problems: Without scaling ("``-S``") the fax is now centered on the page size specified with "``-H``" and/or "``-W``". Before, :program:`fax2ps` was using an obscure and practically useless algorithm to allocate the image relative to Letter sized paper which sometime sled to useless whitespace on the paper, while at the same time cutting of the faxes printable area at the opposite border. Second, scaling now preserves aspect ratio, which makes unusual faxes (in particular short ones) print properly. * :file:`thumbnail.c`: changed default output compression to packbits from LZW since LZW isn't generally available. * :file:`tiff2rgba.c`: added "``-n``" flag to avoid emitting alpha component. Also added a man page for :program:`tiff2rgba`. * :file:`tiffcmp.c`: Fixed multi samples per pixel support for :c:func:`ContigCompare` as per bug :bugzilla-rs:`53`. Updated bug section of tiffcmp.1 to note tiled file issues. * :file:`libtiff/tif_getimage.c`: Fixed so that failure is properly reported by :c:func:`gtTileContig`, :c:func:`gtStripContig`, :c:func:`gtTileSeparate` and :c:func:`gtStripSeparate` as per bug :bugzilla-rs:`51`. Contributed software changes ---------------------------- * Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c` and :file:`contrib/addtiffo/tif_ovrcache.h`. LZW compression kit changes --------------------------- * Rewrote lzw patching process so that is required to enable full LZW support is to drop the :file:`tif_lzw.c` from the ``libtiff-lzw-compression-kit`` over the one in the libtiff directory. * Some changes were made to make recovery from failure to initialize the LZW compressor more graceful. * Note that as distributed libtiff support LZW decompression, but not LZW compression. Changes in TIFF v3.6.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.6.0 (:tag:`Release-v3-6-0`) Previous Version :doc:`v3.5.7 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * New utility :program:`raw2tiff` for converting raw rasters into TIFF files. * Lots of new :program:`tiff2ps` options. * Lots of new :program:`fax2tiff` options. * Lots of bug fixes for LZW, JPEG and OJPEG compression. Custom Tag Support ^^^^^^^^^^^^^^^^^^ The approach to extending libtiff with custom tags has changed radically. Previously, all internally supported TIFF tags had a place in the private :c:struct:`TIFFDirectory` structure within libtiff to hold the values (if read), and a "field number" (ie. :c:macro:`FIELD_SUBFILETYPE`) used to identify that tag. However, every time a new tag was added to the core, the size of the :c:struct:`TIFFDirectory` structure would change, breaking any dynamically linked software that used the private data structures. Also, any tag not recognised by libtiff would not be read and accessible to applications without some fairly complicated work on the applications part to pre-register the tags as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on libtiff. Among other things this approach required the extension code to access the private libtiff structures ... which made the higher level non-libtiff code be locked into a specific version of libtiff at compile time. This caused no end of bug reports! The new approach is for libtiff to read all tags from TIFF files. Those that aren't recognised as "core tags" (those having an associated ``FIELD_`` value, and place for storage in the :c:struct:`TIFFDirectory` structure) are now read into a dynamic list of extra tags (:c:member:`td_customValues` in :c:struct:`TIFFDirectory`). When a new tag code is encountered for the first time in a given TIFF file, a new anonymous tag definition is created for the tag in the tag definition list. The type, and some other metadata is worked out from the instance encountered. These fields are known as "custom tags". Custom tags can be set and fetched normally using :c:func:`TIFFSetField` and :c:func:`TIFFGetField`, and appear pretty much like normal tags to application code. However, they have no impact on internal libtiff processing (such as compression). Some utilities, such as :program:`tiffcp` will now copy these custom tags to the new output files. As well as the internal work with custom tags, new C API entry points were added so that extension libraries, such as libgeotiff, could define new tags more easily without accessing internal data structures. Because tag handling of extension tags is done via the "custom fields" mechanism as well, the definition provided externally mostly serves to provide a meaningful name for the tag. The addition of "custom tags" and the altered approach to extending libtiff with externally defined tags is the primary reason for the shift to the 3.6.x version number from 3.5.x. Software configuration changes ------------------------------ * :file:`configure`, :file:`config.site`: Fix for large files (>2GiB) support. New option in the config.site: ``LARGEFILE="yes"``. Should be enough for the large files I/O. * :file:`configure`: Set ``-DPIXARLOG_SUPPORT`` option along with ``-DZIP_SUPPORT``. * :file:`html/Makefile.in`: Updated to use :program:`groffhtml` for generating html pages from man pages. * :file:`configure`, :file:`libtiff/Makefile.in`: Added SCO OpenServer 5.0.6 support from John H. DuBois III. * :file:`libtiff/Makefile.vc`, :file:`libtiff/libtiff.def`: Missed declarations added. * :file:`libtiff/Makefile.in`, :file:`tools/Makefile.in`: Shared library will not be stripped when installing, utility binaries will do be stripped. As per bug :bugzilla-rs:`93`. * :file:`man/Makefile.in`: Patch ``DESTDIR`` handling as per bug :bugzilla-rs:`95`. * :file:`configure`: OpenBSD changes for Sparc64 and DSO version as per bug :bugzilla-rs:`96`. * :file:`config.site/configure`: added support for ``OJPEG=yes`` option to enable OJPEG support from :file:`config.site`. * :file:`config.gues`, :file:`config.sub`: Updated from ``_. * :file:`configure`: Modify ``CheckForBigEndian`` so it can work in a cross compiled situation. * :file:`configure`, :file:`libtiff/Makefile.in`: Changes for building on MacOS 10.1 as per bug :bugzilla-rs:`94`. * :file:`html/Makefile.in`: added missing images per bug :bugzilla-rs:`92`. * :file:`port/Makefile.in`: fixed clean target per bug :bugzilla-rs:`92`. Library changes --------------- * :file:`libtiff/tif_getimage.c`: New function :c:func:`TIFFReadRGBAImageOriented` implemented to retrieve raster array with user-specified origin position. * :file:`libtiff/tif_fax3.c`: Fix wrong line numbering. * :file:`libtiff/tif_dirread.c`: Check field counter against number of fields. * Store a list of opened IFD to prevent directory looping. * :file:`libtiff/tif_jpeg.c`: modified segment_height calculation to always be a full height tile for tiled images. Also changed error to just be a warning. * :file:`libtiff/tif_lzw.c`: fixed so that decoder state isn't allocated till :c:func:`LZWSetupDecode`. Needed to read LZW files in "``r+``" mode. * :file:`libtiff/tif_dir.c`: fixed up the :c:member:`tif_postdecode` settings responsible for byte swapping complex image data. * :file:`libtiff/tif_open.c`: Removed error if opening a compressed file in update mode bug (:bugzilla-rs:`198`). * :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteCheck` now fails if the image is a pre-existing compressed image. That is, image writing to pre-existing compressed images is not allowed. * :file:`html/man/*.html`: Web pages regenerated from man pages. * :file:`libtiff/tif_jpeg.c`: Hack to ensure that "boolean" is defined properly on Windows so as to avoid the structure size mismatch error from libjpeg (bug :bugzilla-rs:`188`). * :file:`libtiff/tiff.h`: ``#ifdef USING_VISUALAGE`` around previous Visual Age AIX porting hack as it screwed up gcc. (bug :bugzilla-rs:`39`) * :file:`libtiff/tiff.h`: added :c:macro:`COMPRESSION_JP2000` (34712) for LEAD tools custom compression. * :file:`libtiff/tif_dirread.c`: Another fix for the fetching ``SBYTE`` arrays by the :c:func:`TIFFFetchByteArray` function. (bug :bugzilla-rs:`52`) * :file:`libtiff/tif_dirread.c`: Expand ``v[2]`` to ``v[4]`` in :c:func:`TIFFFetchShortPair` as per bug :bugzilla-rs:`196`. * :file:`libtiff/tif_lzw.c`: Additional consistency checking added in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` fixing bugs :bugzilla-rs:`190` and :bugzilla-rs:`100`. * :file:`libtiff/tif_lzw.c`: Added check for valid code lengths in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat`. Fixes bug :bugzilla-rs:`115`. * :file:`tif_getimage.c`: Ensure that :c:func:`TIFFRGBAImageBegin` returns the return code from the underlying pick function as per bug :bugzilla-rs:`177`. * :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`, :file:`libtiff/tif_print.c`: Hacked :file:`tif_jpeg.c` to fetch :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` from the jpeg data stream if it isn't present in the tiff tags as per bug :bugzilla-rs:`168`. * :file:`libtiff/tif_jpeg.c`: Fixed problem with setting of :c:var:`nrows` in :c:func:`JPEGDecode` as per bug :bugzilla-rs:`129`. * :file:`libtiff/tif_read.c`, :file:`libtiff/tif_write.c`: :c:func:`TIFFReadScanline` and :c:func:`TIFFWriteScanline` now set :c:member:`tif_row` explicitly in case the codec has fooled with the value as per bug :bugzilla-rs:`129`. * :file:`libtiff/tif_ojpeg.c`: Major upgrade from Scott. Details in bug :bugzilla-rs:`156`. * :file:`libtiff/tif_open.c`: Pointers to custom procedures in :c:func:`TIFFClientOpen` are checked to be not :c:macro:`NULL` pointers. * :file:`libtiff/tif_lzw.c`: Assertions in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` replaced by warnings. Now libtiff should read corrupted LZW-compressed files by skipping bad strips as per bug :bugzilla-rs:`100`. * :file:`libtiff/tif_dirwrite.c`, :file:`libtiff/tif_write.c`, :file:`libtiff/tiffio.h`: :c:func:`TIFFCheckpointDirectory` routine added as per bug :bugzilla-rs:`124`. The :doc:`/functions/TIFFWriteDirectory` man page discusses this new function as well as the related :c:func:`TIFFRewriteDirectory`. * :file:`libtiff/tif_codec.c`, :file:`libtiff/tif_compress.c`, :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_getimage.c`: Introduced additional members ``tif->tif_decodestatus`` and ``tif->tif_encodestatus`` for correct handling of unconfigured codecs (we should not try to read data or to define data size without correct codecs). See bug :bugzilla-rs:`119`. * :file:`tif_dirread.c`: avoid div-by-zero if :c:var:`rowbytes` is zero in chop func as per bug :bugzilla-rs:`111`. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: Dwight Kelly added get/put code for new tag ``XMLPACKET`` as defined in Adobe XMP Technote. Added missing ``INKSET`` tag value from TIFF 6.0 spec ``INKSET_MULTIINK`` (=2). Added missing tags from Adobe TIFF technotes: ``CLIPPATH``, ``XCLIPPATHUNITS``, ``YCLIPPATHUNITS``, ``OPIIMAGEID``, ``OPIPROXY`` and ``INDEXED``. Added ``PHOTOMETRIC`` tag value from TIFF technote 4 ``ICCLAB`` (=9). * :file:`libtiff/tif_getimage.c`: Additional check for supported codecs added in :c:func:`TIFFRGBAImageOK`, :c:func:`TIFFReadRGBAImage`, :c:func:`TIFFReadRGBAStrip` and :c:func:`TIFFReadRGBATile` now use :c:func:`TIFFRGBAImageOK` before reading a per bug :bugzilla-rs:`110`. * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: Added routine :c:func:`TIFFDataWidth` for determining :c:enum:`TIFFDataType` sizes instead of working with :c:var:`tiffDataWidth` array directly as per bug :bugzilla-rs:`109`. * :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirwrite.c`: Added possibility to read broken TIFFs with ``LONG`` type used for :c:macro:`TIFFTAG_COMPRESSION`, :c:macro:`TIFFTAG_BITSPERSAMPLE`, :c:macro:`TIFFTAG_PHOTOMETRIC` as per bug :bugzilla-rs:`99`. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: Add support for :c:macro:``__arch64__`` as per bug :bugzilla-rs:`94`. * :file:`libtiff/tif_read.c`: Fixed :c:func:`TIFFReadEncodedStrip` to fail if the decodestrip function returns anything not greater than zero as per bug :bugzilla-rs:`97`. * :file:`libtiff/tif_jpeg.c`: fixed computation of :c:var:`segment_width` for tiled files to avoid error about it not matching the ``cinfo.d.image_width`` values ("JPEGPreDecode: Improper JPEG strip/tile size.") for ITIFF files. Apparently the problem was incorporated since 3.5.5, presumably during the OJPEG/JPEG work recently. * :file:`libtiff/tif_getimage.c`: If :c:macro:`DEFAULT_EXTRASAMPLE_AS_ALPHA` is 1 (defined in :file:`tiffconf.h` - 1 by default) then the RGBA interface will assume that a fourth extra sample is ``ASSOCALPHA`` if the ``EXTRASAMPLE`` value isn't set for it. This changes the behaviour of the library, but makes it work better with RGBA files produced by lots of applications that don't mark the alpha values properly. As per bugs :bugzilla-rs:`93` and :bugzilla-rs:`65`. * :file:`libtiff/tif_jpeg.c`: allow jpeg data stream sampling values to override those from tiff directory. This makes this work with ImageGear generated files. Tools changes ------------- * :program:`tiff2ps`: * Added page size setting when creating PS Level 2. * Fixed PS comment emitted when FlateDecode is being used. * :program:`tiffsplit`: increased the maximum number of pages that can be split. * :program:`raw2tiff`: * New utility for turning raw raster images into TIFF files written by Andrey Kiselev. * Added option "``-p``" to explicitly select color space of input image data. * :program:`tiffmedian`: Support for large (> 2GB) images. * :program:`ppm2tiff`: Fixed possible endless loop. * :program:`tiff2rgba`: Switched to use :c:func:TIFFReadRGBAImageOriented instead of :c:func:`TIFFReadRGBAImage`. * :program:`tiffcmp`: Fixed problem with unused data comparing (bug :bugzilla-rs:`349`). "``-z``" option now can be used to set the number of reported different bytes. * :program:`tiffcp`: * Added possibility to specify value -1 to "``-r``" option to get the entire image as one strip (bug :bugzilla-rs:`343`). * Set the correct ``RowsPerStrip`` and ``PageNumber`` values (bug :bugzilla-rs:`343`). * Fixed problem with colorspace conversion for JPEG encoded images (bugs :bugzilla-rs:`23` and :bugzilla-rs:`275`) * Added support for ``Orientation`` tag. * :program:`fax2tiff`: * Page numbering fixed (bug :bugzilla-rs:`341`). * Applied patch from Julien Gaulmin. More switches for :program:`fax2tiff` tool for better control of input and output (bugs :bugzilla-rs:`272` and :bugzilla-rs:`293`). * Updated to reflect latest changes in libtiff per bug :bugzilla-rs:`125`. * :program:`ppm2tiff`: PPM header parser improved: now able to skip comments. * :program:`tiff2ps`: * Sebastian Eken provided patches (bug :bugzilla-rs:`200`) to add new these new switches: "``-b #``": for a bottom margin of # inches "``-c``": center image "``-l #``": for a left margin of # inches "``-r``": rotate the image by 180 degrees Also, new features merged with code for shrinking/overlapping. * Force deadzone printing when EPS output specified (bug :bugzilla-rs:`325`). * Add ability to generate PS Level 3. It basically allows one to use the ``/flateDecode`` filter for ZIP compressed TIFF images. Patch supplied by Tom Kacvinsky (bug :bugzilla-rs:`328`). * Don't emit ``BeginData``/``EndData`` DSC comments since we are unable to properly include the amount to skip as per bug :bugzilla-rs:`80`. * Added workaround for some software that may crash when last strip of image contains fewer number of scanlines than specified by the ``/Height`` variable as per bug :bugzilla-rs:`164`. * Patch from John Williams to add new functionality for splitting long images in several pages as per bug :bugzilla-rs:`142`. New switches: "``-H #``": split image if height is more than # inches "``-L #``": overLap split images by # inches * New commandline switches to override resolution units obtained from the input file per bug :bugzilla-rs:`131`: "``-x``": override resolution units as centimeters "``-y``": override resolution units as inches * tiff2ps: Division by zero fixed as per bug :bugzilla-rs:`88`. * :program:`tiffdump`: include :c:macro:`TIFFTAG_JPEGTABLES` in tag list. * :program:`tiffset`: fix bug in error reporting. Contributed software changes ---------------------------- * Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c`, :file:`contrib/addtiffo/tif_ovrcache.h`. * :file:`libtiff/contrib/win95`: renamed to :file:`contrib/win_dib`. Added new :file:`Tiffile.cpp` example of converting TIFF files into a DIB on Win32 as per bug :bugzilla-rs:`143`. LZW compression kit changes --------------------------- * LZW compression kit synchronized with actual libtiff version. Changes in TIFF v3.6.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.6.1 (:tag:`Release-v3-6-1`) Previous Version :doc:`v3.6.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * New utility :program:`tiff2pdf` for converting TIFF images directly into PDF. * New :doc:`/functions/TIFFcolor` color conversion module. * Full support for ``Orientation`` tag in ``TIFFRGBAImage`` interface. * Many bugs fixed. Software configuration changes ------------------------------ * :file:`libtiff/makefile.vc`, :file:`tools/makefile.vc`: Support for IJG JPEG library. * :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. * :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. * :file:`libtiff/tiffcomp.h`: ``#define _BSDTYPES_DEFINED`` when defining BSD typedefs. * :file:`configure`, :file:`libtiff/Makefile.in`, :file:`libtiff/mkversion.c`: Relative buildings fixed. * :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. Library changes --------------- * :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: Added support for ``ReferenceBlackWhite`` tag handling when converted from YCbCr color space as per bug :bugzilla-rs:`120`. * :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_aux.c`: Read ``WhitePoint`` tag from the file and properly use it for CIE Lab 1976 to RGB transform. * :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: Finally resolved problems with orientation handling. ``TIFFRGBAImage`` interface now properly supports all possible orientations, i.e. images will be flipped both in horizontal and vertical directions if required. 'Known bugs' section now removed from the appropriate manual pages. * :file:`libtiff/tif_luv.c`: Fixed bug in 48-bit to 24-bit conversion routine, reported by Antonio Scuri. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_codec.c`: Added new function :c:func:`TIFFIsCODECConfigured`, suggested by Ross Finlayson. * :file:`libtiff/tif_ojpeg.c`: :c:func:`TIFFVGetField` function now can properly extract the fields from the OJPEG files. Patch supplied by Ross Finlayson. * :file:`libtiff/tif_dir.h`: :c:func:`_TIFFFindOrRegisterdInfo` declaration replaced with :c:func:`_TIFFFindOrRegisterFieldInfo` as reported by Ross Finlayson. * :file:`libtiff/tif_dirinfo.c`: Implemented binary search in :c:func:`_TIFFMergeFieldInfo`. Patch supplied by Ross Finlayson. * :file:`tif_dirread.c`: do not mark all anonymously defined tags to be ``IGNORE`` (as it was done in 3.6.0). * :file:`libtiff/tiff.h`, :file:`libtiff/tif_dirinfo.c`: Added support for IFD (13) datatype, introduced in "Adobe PageMaker TIFF Technical Notes". * :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: New color space conversion code: CIE L*a*b* 1976 images now supported by the ``TIFFRGBAImage`` interface. YCbCr to RGB conversion code also moved there and now has :doc:`/functions/TIFFcolor` publicly available interface. These routines currently used in ``TIFFRGBAImage`` interface only and not supported in other libtiff tools yet. So if you want, for example, to convert CIE Lab image into PostScript file you should do it in two steps: change colorspace to RGB using :program:`tiff2rgba` utility and then process it with the :program:`tiff2ps`. * :file:`libtiff/tif_tile.c`: Remove spurious use of "s" (sample) in the ``planarconfig_contig`` case in :c:func:`TIFFComputeTile` as per bug :bugzilla-rs:`387`. * :file:`libtiff/tiffiop.h`: New macros: :c:macro:`TIFFmax` and :c:macro:`TIFFmin`. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_strip.c`: Added :c:func:`TIFFRawStripSize` function as suggested by Chris Hanson. * :file:`libtiff/tif_lzw.c`, :file:`libtiff/tif_fax3.c`: Proper support for update mode as per bug :bugzilla-rs:`424`. Tools changes ------------- * :program:`tiff2pdf`:: New tool, written by Ross Finlayson, to directly convert TIFF files to PDF. * :program:`tiffgt`: Unmaintained and platform dependent sgigt utility removed and replaced with the completely rewritten portable tool (depend on OpenGL and GLUT). This tool will not build by default. * :program:`ras2tiff`: Properly determine SUN Rasterfiles with the reverse byte order (it is reported by the magic header field). Problem reported by Andreas Wiesmann. * :program:`raw2tiff`: Implemented image size guessing using correlation coefficient calculation between two neighbour lines. Contributed software changes ---------------------------- * :file:`contrib/pds/tif_pdsdirread.c`, :file:`contrib/pds/tif_pdsdirwrite.c`: Use :c:func:`TIFFDataWidth` function instead of :c:var:`tiffDataWidth` array. LZW compression kit changes --------------------------- * Proper support for update mode as per bug :bugzilla-rs:`424`. Changes in TIFF v3.7.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0 (:tag:`Release-v3-7-0`) Previous Version :doc:`v3.7.0beta2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Several bugs found after 3.7.0beta2 release were fixed. Software configuration changes ------------------------------ * :file:`ltmain.sh`: Fix for MinGW compilation. Library changes --------------- * :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_luv.c`, :file:`libtiff/tif_ojpeg.c`, :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_write.c`: Handle the zero strip/tile sizes properly (Dmitry V. Levin, Marcus Meissner). * :file:`libtiff/tif_dirinfo.c`: Type of the :c:macro:`TIFFTAG_SUBIFD` field changed to :c:enumerator:`TIFF_IFD`. * Preliminary support for BigTIFF files: now libtiff can recognize and reject to open such images. ;-) * :file:`libtiff/tif_dir.c`: Initialize :c:member:`td_tilewidth` and :c:member:`td_tilelength` fields of the :c:struct:`TIFFDirectory` structure with the 0 instead of -1 to avoid confusing integer overflows in :c:func:`TIFFTileRowSize` for striped images. * :file:`libtiff/tif_dirinfo.c`: Fix bug with ``tif_foundfield`` and reallocation of ``tif_fieldinfo`` as per bug :bugzilla-rs:`630` * :file:`libtiff/tif_compress.c`: Improved error reporting in :c:func:`TIFFGetConfiguredCODECs` (Dmitry V. Levin). Tools changes ------------- * :file:`tiffcmp.c` (:c:func:`leof`): Renamed from "``eof``" in order to avoid conflict noticed under MinGW. * :file:`tiff2pdf.c`: Fixed ``TransferFunction`` tag handling reported by Ross A. Finlayson. Contributed software changes ---------------------------- * None. LZW compression kit changes --------------------------- * This one is not longer needed. Changes in TIFF v3.7.0alpha =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0alpha (:tag:`Release-v3-7-0-alpha`) Previous Version :doc:`v3.6.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Significant changes in software configuration: we are switched to GNU autotools now. * :program:`tiffset`: Set any libtiff supported tags. Tags can be supplied by the mnemonic name or number. Software configuration changes ------------------------------ * Get rid of the old configuration system and switch to GNU autotools. Library changes --------------- * :file:`libtiff/tif_ojpeg.c`: Fixed problem with duplicated ``SOI`` and ``SOF`` markers as per bug :bugzilla-rs:`581`. * :file:`libtiff/tif_open.c`, :file:`libtiff/tiffio.h`: New function added: :c:func:`TIFFIsBigEndian`. Function returns nonzero if given was file written in big-endian order. * :file:`libtiff/tif_print.c`: added (untested) support for printing ``SSHORT``, ``SLONG`` and ``SRATIONAL`` fields. * :file:`libtiff/tif_fax3.c`: Avoid reading CCITT compression options if compression type mismatches. See :bugzilla-rs:`565`. * :file:`libtiff/tif_strip.c`: Never return 0 from the :c:func:`TIFFNumberOfStrips`. * :file:`libtiff/tif_dirread.c`: Workaround for broken TIFF writers which store single ``SampleFormat`` value for multisampled images. See :bugzilla-rs:`562`. * :file:`libtiff/tif_write.c`: Allow in-place updating of the compressed images (don't work properly with all codecs). For details see GDAL bug :bugzilla-rs:`534`. * :file:`libtiff/tif_jpeg.c`: Workaround for wrong sampling factors used in the Intergarph JPEG compressed TIFF images as per bug: :bugzilla-rs:`532`. * :file:`libtiff/tif_open.c`: Use dummy :c:func:`mmap`/:c:func:`munmap` functions in :c:func:`TIFFClientOpen` when the appropriate client functions was not supplied by user. * :file:`libtiff/tif_dirread.c`: Fixed problem with handling :c:enumerator:`TIFF_UNDEFINED` tag type in :c:func:`TIFFFetchNormalTag` as per bug :bugzilla-rs:`508`. * :file:`libtiff/tif_codec.c`: Fixed typo in ``TIFFInitPackBits`` name as per: :bugzilla-rs:`494`. * :file:`libtiff/tif_fax3.c`: Fixed problem, introdiced in 3.6.1 release, with the CCITT encoding modes as per bug :bugzilla-rs:`483`. We need more work on fax codec to support update mode. * :file:`libtiff/tiff.h`: Fixed tag definitions for :c:macro:`TIFFTAG_YCLIPPATHUNITS` and :c:macro:`TIFFTAG_INDEXED` as per bug :bugzilla-rs:`475`. * :file:`libtiff/tif_win32.c`, :file:`libtiff/tif_unix.c`: Check whether the pointer is :c:macro:`NULL` before proceeding further as per bug :bugzilla-rs:`474`. Check results, returned by the :c:func:`TIFFFdOpen` before returning and close file if :c:func:`TIFFFdOpen` failed as per bug :bugzilla-rs:`468`. * :file:`libtiff/libtiff.def`, :file:`libtiff/tif_close.c`, :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: Separate :c:func:`TIFFCleanup` from the :c:func:`TIFFClose` in order to fix the bug :bugzilla-rs:`468`. * :file:`libtiff/tif_dirwrite.c`: Fixed handling of writable ASCII tags that are ``field_passcount=TRUE`` properly. Arguably anonymous custom tags should be declared as ``passcount=FALSE``, but I don't want to change that without a careful review. * :file:`libtiff/tif_write.c`: Fixed reporting size of the buffer in case of stripped image in :c:func:`TIFFWriteBufferSetup`. As per bug :bugzilla-rs:`460`. * :file:`libtiff/tif_dir.c`: Incomplete cleanup in :c:func:`TIFFFreeDirectory`, patch from Gerben Koopmans. * :file:`libtiff/tif_dirread.c`: Check :c:member:`field_passcount` value before setting the value of undefined type, patch from Gerben Koopmans. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: Fixes for AMD 64 platform as suggested by Jeremy C. Reed. * :file:`libtiff/tif_win32.c`: Fixed problem with :c:func:`_TIFFrealloc` when the :c:macro:`NULL` pointer passed. Patch supplied by Larry Grill. Tools changes ------------- * :program:`tiffset`: Set any libtiff supported tags. Tags can be supplied by the mnemonic name or number. * :file:`ycbcr.c`: fixed :c:func:`main` declaration as per: :bugzilla-rs:`513`. * :program:`tiffsplit`: Don't forget to copy ``PhotometricInterpretation`` tag. * :program:`tiffsplit`: * Fixed problem with unproperly written multibyte files. Now output files will be written using the same byte order flag as in the input image. See :bugzilla-rs:`574`. * Copy ``JPEGTables`` tag contents for JPEG compressed images. Reported by Artem Mirolubov. * :program:`tiffcp`: * Close output file on normal exit. * Don't emit warnings when ``Orientation`` tag does not present in the input image. * Properly set Photometric Interpretation in case of JPEG compression of grayscale images. * Fixed problem with wrong interpretation of the ``InkNames`` tag as per bug :bugzilla-rs:`466`. Memory leak fixed. * Fixed problem with wrong ``PhotometricInterpretation`` setting for non-RGB images. Contributed software changes ---------------------------- * Outdated stuff removed. * Almost all programs are synchronized with the current libtiff and should compile without problems. LZW compression kit changes --------------------------- * No changes. Changes in TIFF v3.7.0beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0beta (:tag:`Release-v3-7-0beta`) Previous Version :doc:`v3.7.0alpha ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * LZW compression enabled by default. You don't need the separate compression kit anymore. * :program:`bmp2tiff`: Added new utility to convert Windows BMP files into TIFFs. * The first attempt to implement a test suite. Software configuration changes ------------------------------ * Many portability fixes in the new autotooled build suite. Library changes --------------- * :file:`libtiff/tif_luv.c`, :file:`libtiff/tif_next.c`, :file:`libtiff/tif_thunder.c`: Several buffer overruns fixed, as noted by Chris Evans. * BSD data types (:c:type:`u_char`, :c:type:`u_short`, :c:type:`u_int`, :c:type:`u_long`) is no longer used internally in the libtiff. Should result in simpler configuration and better portability. * :file:`libtiff/tiff.h`: Fix column tagging. Reference current Adobe XMP specification. Reference libtiff bug tracking system to submit private tag additions. * :file:`libtiff/tif_dirread.c`: Don't reject to read tags of the ``SamplesPerPixel`` size when the tag count is greater than number of samples as per bug :bugzilla-rs:`576`. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: Applied patches from Joris Van Damme to avoid requirement for :file:`tiffiop.h` inclusion in some applications. Look for details here: ``_. * :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirinfo.c`: Fixed problem with the static variable as per bug :bugzilla-rs:`593`. * :file:`libtiff/tif_lzw.c`: LZW compression code is merged back from the separate package. All libtiff tools are updated to not advertise an absence of LZW support. * :file:`libtiff/tif_dir.c`: Call :c:func:`TIFFError` instead of producing warnings when setting custom tags by value. Reported by Eric Fieleke. Tools changes ------------- * :program:`tiff2ps`: Avoid zero division in :c:func:`setupPageState` function; properly initialize array in :c:func:`PSDataBW`. * :program:`tiff2pdf`: Multiple bugfixes. * :program:`ras2tiff`: Fixed issue with missed big-endian checks as per bug :bugzilla-rs:`586`. * :program:`bmp2tiff`: Added new utility to convert Windows BMP files into TIFFs. Contributed software changes ---------------------------- * No changes. LZW compression kit changes --------------------------- * This one is not longer needed. Changes in TIFF v3.7.0beta2 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0beta2 (:tag:`Release-v3-7-0beta2`) Previous Version :doc:`v3.7.0beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * The code has been reviewed by Dmitry Levin: added checks for values, returned by the space allocation functions, fixed problems with the possible integer overflows. Software configuration changes ------------------------------ * Several fixes in the test suite. Library changes --------------- * Preliminary support for BigTIFF files: now libtiff can recognize and reject to open such images. ;-) * :file:`libtiff/tif_dirinfo.c`: changed type of XMLPacket (tag 700) to :c:enumerator:`TIFF_BYTE` instead of :c:enumerator:`TIFF_UNDEFINED` to comply with the info in the Adobe XMP Specification. * Added many checks for integer overflow and for successful space allocations in the different parts of library. Code review completed by Dmitry V. Levin. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_compress.c`: Added :c:func:`TIFFGetConfiguredCODECs` function to get the list of configured codecs. Tools changes ------------- * :file:`tiff2bw`: Write ``ImageWidth``/``ImageHeight`` tags to output file, as noted by Gennady Khokhorin. Contributed software changes ---------------------------- * No changes. LZW compression kit changes --------------------------- * This one is not longer needed. Changes in TIFF v3.7.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.1 (:tag:`Release-v3-7-1`) Previous Version :doc:`v3.7.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * This is mostly bugfix release. Most important fix is the one related to wrong custom tag read/write code. Software configuration changes ------------------------------ * :file:`autogen.sh`: :program:`aclocal` and :program:`autoheader` should be executed after :program:`libtoolize`. Also add ``-I .`` to aclocal invocation to check current directory for macros. * nmake.opt: Link with the :file:`user32.lib` in windowed mode. As per bug :bugzilla-rs:`697` * :file:`nmake.opt`, :file:`makefile.vc`: make it easier to rename the libtiff DLL. * :file:`configure`, :file:`configure.ac`: Added ``--enable-rpath`` option to embed linker paths into library binary. Library changes --------------- * :file:`tiff.h`: Revert back libtiff data type definitions as per bug :bugzilla-rs:`687` * :file:`tif_dirread.c`: Do not forget about :c:macro:`TIFF_VARIABLE2` when checking for tag count in :c:func:`TIFFReadDirectory` function. As per bug :bugzilla-rs:`713` * :file:`tif_getimage.c`: Support for multiple-alpha-channelled RGB-images as per bug :bugzilla-rs:`718` * :file:`tif_getimage.c`: ``#define A1`` bracketing for clean build on SunPro compiler. * :file:`tif_dirwrite.c`: Always write :c:macro:`TIFFTAG_SUBIFD` using ``LONG`` type as per bugs :bugzilla-rs:`703` and :bugzilla-rs:`704`. * :file:`tif_win32.c`: Use :c:expr:`char*` strings instead of :c:type:`TCHAR` in windowed mode as per bug :bugzilla-rs:`697` * :file:`tif_dir.c`, :file:`tif_dirread.c`: Remove :c:func:`TIFFReassignTagToIgnore` call from the :c:func:`TIFFReadDirectory` function. :c:func:`TIFFReassignTagToIgnore` must be removed in the future, as it was never used properly. As per bug :bugzilla-rs:`692` * :file:`tif_jpeg.c`: Added a work-around in order to allow compilation with the heavily modified version of libjpeg delivered with Cygwin. * :file:`tif_dir.c`: Properly handle tags, which have the :c:type:`uint32` counts. As per bug :bugzilla-rs:`693` * :file:`tif_unix.c`: Make UNIX module compilable (and usable) on Windows. * :file:`tiff.h`: Added Adobe DNG tags. * :file:`tif_aux.c`: Set the appropriate ``ReferenceBlackWhite`` array for YCbCr image which lacks that tag (noted by Hans Petter Selasky). * :file:`tif_color.c`: Division by zero fixed (Hans Petter Selasky). * :file:`tif_stream.cxx`, :file:`tiffio.h`: Added C++ stream interface contributed by Edward Lam (see :bugzilla-rs:`654` for details). Those who want to use C++ streams should ``#include ``. * :file:`tif_open.c`: Removed :c:func:`close` in :c:func:`TIFFClientOpen` if file is bad. This is the callers responsibility. :bugzilla-rs:`651` * :file:`tiffio.h`, :file:`tif_win32.c`, :file:`libtiff.def`: Added :c:func:`TIFFOpenW` function to work with the double byte strings (used to represent filenames in some locales). As per bug :bugzilla-rs:`625` * :file:`tif_dirread.c`: Fixed problem when fetching ``BitsPerSample`` and ``Compression`` tags of type ``LONG`` from broken TIFFs as per bug :bugzilla-rs:`662` * :file:`tif_dirinfo.c`: Fixed definition for ``TIFFTAG_RICHTIFFIPTC``, the writecount should have :c:type:`uint32` type. As per bug :bugzilla-rs:`662` * :file:`tif_write.c`: Fixed wrong ``if()`` statement in :c:func:`TIFFAppendToStrip` function as per bug :bugzilla-rs:`660` * :file:`tif_dirinfo.c`: Change definition for ``TIFFTAG_EXTRASAMPLES`` field. The caller should supply a count when setting this field. As per bug :bugzilla-rs:`648`. * :file:`tif_jpeg.c`, :file:`tif_ojpeg.c`: ``TIFFTAG_JPEGTABLES`` should have uint32 count. Use this type everywhere. * :file:`tif_next.c`: avoid use of :c:type:`u_long` and :c:type:`u_char` types. * :file:`tif_fax3.c`: Fixed case with the wrong decode routines choosing when the incorrect ``Group4Options`` tag set. As per bug :bugzilla-rs:`323` * :file:`tif_dirwrite.c`: Fixed problem with passing count variable of wrong type when writing the :c:macro:`TIFF_BYTE`/:c:macro:`TIFF_SBYTE` tags in :c:func:`TIFFWriteNormalTag`. * :file:`tif_compress.c`: Zero division problem fixed (Vladimir Nadvornik, Dmitry V. Levin). Tools changes ------------- * :file:`fax2ps.c`: Be able to extract the first page (#0). As per bug :bugzilla-rs:`690` * :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Position`` tags (Tristan Hill). * :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Resolution`` tags (Peter Fales). * :file:`tiffset.c`: Check the :c:func:`malloc` return value (Dmitry V. Levin). Contributed software changes ---------------------------- * None. Changes in TIFF v3.7.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.2 (:tag:`Release-v3-7-2`) Previous Version :doc:`v3.7.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Maintenance release. Many bugfixes in the build environment and compatibility improvements. Software configuration changes ------------------------------ * :file:`configure.ac`: Use ``-rpath`` option instead of ``-R`` as per bug :bugzilla-rs:`732` * :file:`tif_stream.cxx`: Fixes for C++ stream interface from Michael Rinne and Edward Lam. * :file:`configure.ac`: Make the documentation directory location configurable via the ``--with-docdir`` option (as suggested by Jeremy C. Reed). * Place the C++ stream API in the separate library called ``libtiffxx`` to avoid unneeded dependencies. Probably there will be more C++ API in the future. As per bugs :bugzilla-rs:`733` and :bugzilla-rs:`730` * :file:`configure`, :file:`configure.ac`: Replace ``--disable-c++`` with the ``--disable-cxx`` option as per bug :bugzilla-rs:`730`. Library changes --------------- * Applied patch from Lee Howard to support a new tag ``TIFFTAG_FAXDCS`` (34911) used in HylaFax software. As per bug :bugzilla-rs:`771` * :file:`tif_open.c`: Remove unnecessary :c:func:`TIFFSeekFile` call as per bug :bugzilla-rs:`756` * :file:`tiff.h`: Changed the :c:type:`int8` definition to be always :c:expr:`signed char` as per bug :bugzilla-rs:`727` * :file:`tiffio.h`: Move :c:func:`TIFFOpenW` function into the ``extern "C"{}`` block as per bug :bugzilla-rs:`763` * :file:`tif_dirread.c`: Estimate strip size in case of wrong or suspicious values in the tags. As per bugs :bugzilla-rs:`705` and :bugzilla-rs:`320` * :file:`tif_color.c`: Use double as the second argument of :c:func:`pow` function in :c:func:`TIFFCIELabToRGBInit`. As per bug :bugzilla-rs:`741` * :file:`tif_pixarlog.c`: Avoid warnings when converting float to integer as per bug :bugzilla-rs:`740` * :file:`tif_getimage.c`: Always fill the error message buffer in :c:func:`TIFFRGBAImageBegin` as per bug :bugzilla-rs:`739` * :file:`tif_jpeg.c`: Added ability to read/write the fax specific :c:macro:`TIFFTAG_FAXRECVPARAMS`, :c:macro:`TIFFTAG_FAXSUBADDRESS` and :c:macro:`TIFFTAG_FAXRECVTIME` tags as per bug :bugzilla-rs:`736` * :file:`tif_win32.c`: Fixed message formatting in functions :c:func:`Win32WarningHandler` and :c:func:`Win32ErrorHandler` as per bug :bugzilla-rs:`735` * :file:`tiffio.h`: Move the color conversion routines in the ``extern "C"`` section as per bug :bugzilla-rs:`727` * :file:`tiff.h`: Restore back the workaround for AIX Visual Age C compiler to avoid double definition of BSD types as per bug :bugzilla-rs:`39` * :file:`tif_getimage.c`: More fixes for multiple-alpha-channelled RGB-images as per bug :bugzilla-rs:`713` Tools changes ------------- * :file:`tiffcmp.c`: Added ability to compare the 32-bit integer and floating point data; complain on unsupported bit depths. * :file:`tiffcmp.c`: Use properly sized buffer in short arrays comparison as per bug :bugzilla-rs:`785` * :file:`fax2ps.c`: Replace insecure :c:func:`mktemp` function with the :c:func:`tmpfile` as per bug :bugzilla-rs:`786` * :file:`tiffgt.c`: Fix problem on big-endian CPUs so that images display more correctly. Images display brighter than they should on a Sun workstation. * :file:`tiff2ps.c`: Fixed problem with page sizes as per bug :bugzilla-rs:`742` * :file:`tiff2ps.c`: Interpret the "``-w``" and "``-h``" options independently. As per bug :bugzilla-rs:`689` * :file:`tiffdump.c`: Fixed problem when read broken TIFFs with the wrong tag counts (Dmitry V. Levin, Martin Pitt). * :file:`tiffset.c`: Convert character option to integer value as per bug :bugzilla-rs:`725`. Contributed software changes ---------------------------- * None. Changes in TIFF v3.7.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.3 (:tag:`Release-v3-7-3`) Previous Version :doc:`v3.7.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Replace runtime endianness check with the compile time one. * Added support for the new predictor type (floating point predictor), defined at the TIFF Technical Note 3. * Added Support for custom tags, passed by value. * Added support for all DNG tags. Software configuration changes ------------------------------ * Do not use empty ``-R`` option when linking with ``--enable-rpath``. * Added workaround for OpenBSD/MirOS soname problem as per bug :bugzilla-rs:`838` * Fixed parallel compilation of the libtiff and libtiffxx libraries as per bug :bugzilla-rs:`826` * :file:`configure.ac`, :file:`libtiff/Makefile.am`: Use libtool machinery to pass ``rpath`` option. * :file:`make.opt`: Build with Win32 CRT library by default. Library changes --------------- * :file:`tiffiop.h`, :file:`tif_open.c`: Added open option "``h``" to avoid reading the first IFD when needed. As per bug :bugzilla-rs:`875` * :file:`tiff.h`: Use correct :c:expr:`int` size on Sparc 64bit/Sun compiler platform. As per bug :bugzilla-rs:`855` * :file:`tif_dirinfo.c`: Added support for ``ClipPath``, ``XClipPathUnits`` and ``YClipPathUnits`` tags. * :file:`tif_dirinfo.c`, :file:`tif_dir.h`, :file:`tif_dir.c`, :file:`tif_print.c`: Make ``DocumentName``, ``Artist``, ``HostComputer``, ``ImageDescription``, ``Make``, ``Model``, ``Copyright``, ``DateTime``, ``PageName``, ``TextureFormat``, ``TextureWrapModes`` and ``TargetPrinter`` tags custom. * :file:`tif_jpeg.c`: Cleanup the codec state depending on :c:macro:`TIFF_CODERSETUP` flag (to fix memory leaks). * :file:`tif_dirwrite.c`: Use :c:member:`tdir_count` when calling :c:func:`TIFFCvtNativeToIEEEDouble` in the :c:func:`TIFFWriteDoubleArray` function as per bug :bugzilla-rs:`845` * :file:`tif_dirinfo.c`, :file:`tif_print.c`: :c:func:`TIFFFetchByteArray` returns :c:type:`uint16` array when fetching the ``BYTE`` and ``SBYTE`` fields, so we should consider result as pointer to :c:type:`uint16` array and not as array of :c:expr:`char`. As per bug :bugzilla-rs:`831` * :file:`tif_dir.c`: More efficient custom tags retrieval as per bug :bugzilla-rs:`830` * :file:`tif_win32.c`: Use ``FILE_SHARE_READ | FILE_SHARE_WRITE`` share mode in :c:func:`CreateFile` call as per bug :bugzilla-rs:`829` * :file:`tif_jpeg.c`: Substantial fix for :program:`addtiffo` problems with JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables in directory. * :file:`tif_dirread.c`: Changed the code that computes ``stripbytecount[0]`` if it appears bogus to ignore if ``stripoffset[0]`` is zero. This is a common case with GDAL indicating a "null" tile/strip. * :file:`tif_jpeg.c`: added ``LIB_JPEG_MK1`` support in :c:func:`JPEGDecodeRaw`. * :file:`tif_dirread.c`: Ensure that broken files with too many values in :c:func:`TIFFFetchPerSampleShorts`, :c:func:`TIFFFetchPerSampleLongs` and :c:func:`TIFFFetchPerSampleAnys` work ok instead of crashing. :bugzilla-rs:`843` * :file:`tif_predict.h`, :file:`tif_predict.c`: Added ability to decode and encode floating point predictor, as per TIFF Technical Note 3. See http://chriscox.org/TIFF_TN3_Draft2.pdf for details. * :file:`tiffio.h`, :file:`tiffiop.h`, :file:`tif_dir.c`, :file:`tif_read.c`, :file:`tif_swab.c`: Added :c:func:`_TIFFSwab24BitData` and :c:func:`TIFFSwabArrayOfLong` functions used to swap 24-bit floating point values. * :file:`tiff.h`: Added predictor constants. * :file:`tiffiop.h`, :file:`tif_dir.c`: Use :c:type:`uint32` type for appropriate values in :c:func:`_TIFFVSetField` function. Inspired by the bug :bugzilla-rs:`816` * :file:`tif_open.c`: Do not read header in case the output file should be truncated (Ron). * :file:`tif_dirinfo.c`, :file:`tif_config.h`.vc: Use :c:func:`lfind` instead of :c:func:`bsearch` in :c:func:`_TIFFFindFieldInfoByName` function (Ron). * :file:`tif_dir.c`, :file:`tif_print.c`: Properly handle all data types in custom tags. * :file:`dirinfo.c`: Added DNG tags. * :file:`tiff.h`: Added missed DNG tag (``LensInfo``); added DNG 1.1.0.0 tags. * :file:`tif_dir.c`, :file:`tif_print.c`: Added Support for custom tags, passed by value. * :file:`tiff.h`, :file:`tif_dirinfo.c`, :file:`tiffiop.h`: Added EXIF related tags. Tools changes ------------- * :file:`tiff2pdf.c`: Print two characters per loop in the :c:func:`t2p_write_pdf_trailer`. As per bug :bugzilla-rs:`594` * :file:`tiffgt.c`: Use MacOS X OpenGL framework when appropriate. As per bug :bugzilla-rs:`844` * :file:`ppm2tiff.c`: Fixed format string when read PPM file header with the :c:func:`fscanf` function. As per bug :bugzilla-rs:`861` * :file:`tiffsplit.c`: Check for ``JPEGTables`` tag presence before copying. * :file:`tiff2pdfr.c`: Calculate the tile width properly; added new option "``-b``" to use interpolation in output PDF files (Bruno Ledoux). * :file:`tiffdither.c`: Copy the `PhotometricInterpretation` tag from the input file. * :file:`tif2pdf.c`: Fixed problem with alpha channel handling as per bug :bugzilla-rs:`794`. Contributed software changes ---------------------------- * :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, :file:`addtiffo/tif_ovrcache.h`: Make overviews working for contiguous images. Changes in TIFF v3.7.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.4 (:tag:`Release-v3-7-4`) Previous Version :doc:`v3.7.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Fixed important bug in custom tags handling code. Software configuration changes ------------------------------ * Applied patch from Patrick Welche (all scripts moved in the :file:`config` and :file:`m4` directories). * :file:`SConstruct`, :file:`libtiff/SConstruct`: Added the first very preliminary support for SCons software building tool (``_). This is experimental infrastructure and it will exist along with the autotools stuff. * :file:`port/lfind.c`: Added :c:func:`lfind` replacement module. Library changes --------------- * :file:`tif_dir.c`: When prefreeing ``tv->value`` in :c:func:`TIFFSetFieldV` also set it to :c:macro:`NULL` to avoid double free when re-setting custom string fields as per: :bugzilla-rs:`922` * tif_dir.c: Fixed up support for swapping "double complex" values (128 bits as 2 64 bits doubles). GDAL gcore tests now pass on bigendian (macosx) system. * :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirinfo.c`: Do not upcast ``BYTE`` to ``SHORT`` in the :c:func:`TIFFFetchByteArray`. Remove :c:func:`TIFFFetchExtraSamples` function, use :c:func:`TIFFFetchNormalTag` instead as per bug :bugzilla-rs:`831` Remove :c:func:`TIFFFetchExtraSamples` function, use :c:func:`TIFFFetchNormalTag` instead. * :file:`tif_print.c`: Fixed printing of the ``BYTE`` and ``SBYTE`` arrays. * :file:`tif_write.c`: Do not check the ``PlanarConfiguration`` field in the :c:func:`TIFFWriteCheck` function in case of single band images (as per TIFF spec). * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_print.c`: Make ``FieldOfViewCotangent``, ``MatrixWorldToScreen``, ``MatrixWorldToCamera``, ``ImageFullWidth``, ``ImageFullLength`` and ``PrimaryChromaticities`` tags custom. Tools changes ------------- * :file:`tiffcp.c`: Fixed ``WhitePoint`` tag copying. Contributed software changes ---------------------------- * :file:`tiffdump.c`: Added support for :c:enumerator:`TIFF_IFD` datatype. * :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, :file:`addtiffo/tif_ovrcache.h`: Make overviews working for contiguous images. Changes in TIFF v3.8.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.8.0 (:tag:`Release-v3-8-0`) Previous Version :doc:`v3.7.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Read-only support for custom directories (e.g. EXIF directory). * Preliminary support for MS MDI format. Software configuration changes ------------------------------ * Make the default strip size configurable via the ``--with-default-strip-size`` and :c:macro:`STRIP_SIZE_DEFAULT` options. Library changes --------------- * :file:`tiffio.h`: Added :c:macro:`VC_EXTRALEAN` definition before including :file:`windows.h`, to reduce the compile time. * :file:`tif_jpeg.c`: Improve compilation under MinGW. * :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_dirwrite.c`, :file:`tif_print.c`, :file:`tif_getimage.c`: Make ``InkSet``, ``NumberOfInks``, ``DotRange`` and ``StoNits`` tags custom. * :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make ``WhitePoint`` tag custom. * :file:`tiffio.h`: fixed typo that potentially resulted in redefininition of :c:macro:`USE_WIN32_FILEIO` * :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make ``RichTIFFIPTC``, ``Photoshop`` and ``ICCProfile`` tags custom. * :file:`libtiff/*`, :file:`contrib/*`: Added 'dual-mode' error handling, enabling newer code to get context indicator in error handler and still remain compatible with older code: Done :c:func:`TIFFError` calls everywhere except in tools. * :file:`tiffinfo.c`: Print ``EXIF`` directory contents if exist. * :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, :file:`tif_dir.c`: Custom directory read-only support. * :file:`tif_aux.c`, :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, :file:`tif_dir.c`, :file:`tif_print.c`: Make ``YCbCrCoefficients`` and ``ReferenceBlackWhite`` tags custom. * :file:`tif_dirread.c`: One more workaround for broken ``StripByteCounts`` tag. Handle the case when ``StripByteCounts`` array filled with completely wrong values. * :file:`tif_dirinfo.c`: Release file descriptor in case of failure in the :c:func:`TIFFOpenW` function as per bug :bugzilla-rs:`1003` * :file:`tif_dirinfo.c`: Correctly use :c:func:`bsearch` and :c:func:`lfind` functions as per bug :bugzilla-rs:`1008` * :file:`tif_open.c`, :file:`tiff.h`, :file:`tiffdump.c`: Incorporate preliminary support for MS MDI format. :bugzilla-rs:`1002` * libtiff.def, :file:`tiffiop.h`, :file:`tiffio.h`: Made :c:func:`TIFFFreeDirectory` public. * :file:`/tif_dirinfo.c`: Make ``XResolution``, ``YResolution`` and ``ResolutionUnit`` tags modifiable during write process. As per bug :bugzilla-rs:`977` * :file:`if_dirread.c`: Don't try and split single strips into "0" strips in :c:func:`ChopUpSingleUncompressedStrip`. This happens in some degenerate cases (like 1×1 files with ``stripbytecounts==0`` (:file:`gtsmall.jp2` embed tiff) * :file:`tif_fax3.c`: changed '`at scanline ...`' style warning/errors with incorrect use of tif_row, to '`at line ... of strip/tile ...`' style. Tools changes ------------- * :file:`tiffcp.c`: Added many error reporting messages; fixed integer overflow as per bug :bugzilla-rs:`789` * :file:`tiffcp.c`: Return non-zero status when reading fails. * :file:`fax2tiff.c`: Properly calculate sizes of temporary arrays as per bug :bugzilla-rs:`943` * :file:`fax2tiff.c`: Added option `-r` to set RowsPerStrip parameter as per bug :bugzilla-rs:`944` * :file:`tiffdump.c`: Fixed :c:var:`typeshift` and :c:var:`typemask` arrays initialization problem as per bug :bugzilla-rs:`946` * :file:`bmp2tiff.c`: Fixed possible integer overflow error as per bug :bugzilla-rs:`965` * :file:`tiffsplit.c`: Copy fax related fields over split parts as per bug :bugzilla-rs:`983` * :file:`tiffdump.c`: Fixed crash when reading malformed tags. * :file:`tiff2pdf.c`: Added missed ``break`` statement as per bug :bugzilla-rs:`932` Contributed software changes ---------------------------- * :file:`contrib/addtiffo/*`: Major upgrade by Joris to support subsampled YCbCr images in jpeg compressed TIFF files. Changes in TIFF v3.8.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.8.1 (:tag:`Release-v3-8-1`) Previous Version :doc:`v3.8.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Bug-fix release. Software configuration changes ------------------------------ * libtool related stuff updated from the 2.1a branch. * Fix ``with_default_strip_size`` comparison as reported by Norihiko Murase. Library changes --------------- * :file:`tif_dirread.c`: Fixed error reporting in :c:func:`TIFFFetchAnyArray` function as per bug :bugzilla-rs:`1102` * :file:`tif_jpeg.c`, :file:`tif_pixarlog.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`: Properly restore ``setfield``/``getfield`` methods in cleanup functions. As per bug :bugzilla-rs:`1102` * :file:`tif_lzw.c`, :file:`tif_pixarlog.c`, :file:`tif_zip.c`: Use :c:func:`TIFFPredictorCleanup` in codec cleanup methods. As per bug :bugzilla-rs:`1102` * :file:`tif_predict.c`, :file:`tif_predict.h`: Added new function :c:func:`TIFFPredictorCleanup` to restore parent decode/encode/field methods. * :file:`tif_dirread.c`: Fixed integer overflow condition in :c:func:`TIFFFetchData` function. As per bug :bugzilla-rs:`1102` * :file:`tif_ojpeg.c`: Set the ``ReferenceBlackWhite`` with the :c:func:`TIFFSetField` method, not directly. As per bug :bugzilla-rs:`1043` * :file:`tif_write.c`: Small code rearrangement in :c:func:`TIFFWriteScanline` to avoid crash as per bug :bugzilla-rs:`1081` * :file:`tif_dirwrite.c`: Properly write ``TIFFTAG_DOTRANGE`` tag as per bug :bugzilla-rs:`1088` * :file:`tif_print.c`: Properly read :c:macro:`TIFFTAG_PAGENUMBER`, :c:macro:`TIFFTAG_HALFTONEHINTS`, :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` and :c:macro:`TIFFTAG_DOTRANGE` tags as per bug :bugzilla-rs:`1088` * :file:`tif_tile.c`: Fix error reporting in :c:func:`TIFFCheckTile` as per bug :bugzilla-rs:`1063` * :file:`tif_color.c`: Avoid overflow in case of wrong input as per bug :bugzilla-rs:`1065` * :file:`tif_dirinfo.c`: Use :c:enumerator:`TIFF_NOTYPE` instead of 0 when appropriate. As per bug :bugzilla-rs:`1033` * :file:`tif_aux.c`: Fixed type of temporary variable in :c:func:`_TIFFCheckMalloc` as per bug :bugzilla-rs:`103` * :file:`tif_aux.c`: Return static array when fetching default ``YCbCrCoefficients`` (another problem, reported a the :bugzilla-rs:`1029` entry). * :file:`tif_dir.c`: Special handling for ``PageNumber``, ``HalftoneHints``, ``YCbCrSubsampling`` and ``DotRange`` tags as per bugs :bugzilla-rs:`1029` :bugzilla-rs:`1034` * :file:`tif_dirread.c`: Use :c:func:`_TIFFGetExifFieldInfo` instead of :c:func:`_TIFFGetFieldInfo` in :c:func:`TIFFReadEXIFDirectory` call as per bug :bugzilla-rs:`1026` * :file:`tif_dirinfo.c`: Change definitions for :c:macro:`TIFFTAG_ICCPROFILE`, :c:macro:`TIFFTAG_PHOTOSHOP`, :c:macro:`TIFFTAG_RICHTIFFIPTC`, :c:macro:`TIFFTAG_XMLPACKET`: readcount should be :c:type:`uint32` value. Tools changes ------------- * :file:`ppm2tiff.c`: Added support for PBM files as per bug :bugzilla-rs:`1044` * :file:`tiff2pdf.c`: Functions :c:func:`t2p_sample_rgbaa_to_rgb` and :c:func:`t2p_sample_rgba_to_rgb` was used in place of each other, that was resulted in problems with RGBA images with associated alpha. As per bug :bugzilla-rs:`1097` * :file:`tiff2ps.c`: Properly scale all the pages when converting multipage TIFF with /width/height/center options set. As per bug :bugzilla-rs:`1080` * :file:`tiff2pdf.c`: Do not create output file until all option checks will be done. As per bug :bugzilla-rs:`1072` * :file:`bmp2tiff.c`: Added ability to create multipage TIFFs from the list of input files as per bug :bugzilla-rs:`1077` * :file:`tiffgt.c`: Avoid crashing in case of image unsupported by TIFFRGBAImage interface. * :file:`tiff2pdf.c`: Fixed support for non-YCbCr encoded JPEG compressed TIFF files, per submission from Dan Cobra. * :program:`bmp2tiff`, :program:`pal2rgb`, :program:`ppm2tiff`, :program:`ras2tiff`, :program:`raw2tiff`, :program:`sgi2tiff`, :program:`tiff2bw`, :program:`tiffcp`: Fixed jpeg option processing so ``-c jpeg:r:50`` works properly as per bug: :bugzilla-rs:`1025` Contributed software changes ---------------------------- None. Changes in TIFF v3.8.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.8.2 (:tag:`Release-v3-8-2`) Previous Version :doc:`v3.8.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Bug-fix release. Software configuration changes ------------------------------ * :file:`tools/Makefile.am`: Use runtime paths linker flags when rpath option enabled. * Makefiles improvements as per bug :bugzilla-rs:`1128` * Fixed win32 I/O functions usage as per bug :bugzilla-rs:`1127` Library changes --------------- * :file:`tif_strip.c`: Take subsampling in account when calculating :c:func:`TIFFScanlineSize`. * :file:`tif_jpeg.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`, :file:`tif_pixarlog.c`, :file:`tif_lzw.c`, :file:`tif_luv.c`: Use :c:func:`_TIFFSetDefaultCompressionState` in all codec cleanup methods. As per bug :bugzilla-rs:`1120` * :file:`tif_jpeg.c`: Do not cleanup codec state in :c:func:`TIFFInitJPEG`. As per bug :bugzilla-rs:`1119` * :file:`tif_dir.c`: Use :c:expr:`double` type instead of :c:type:`dblparam_t`. * :file:`tif_dirread.c`: Do not check the ``PlanarConfig`` tag presence in :c:func:`TIFFReadDirectory`, because it is always set at the start of function and we allow TIFFs without that tag set. Tools changes ------------- * :file:`tiffcp.c`: Do not set ``RowsPerStrip`` bigger than image length. * :file:`fax2tiff.c`: Fixed wrong :c:func:`TIFFerror` invocations as per bug :bugzilla-rs:`1125` * :file:`fax2ps.c`: Fixed reading the input stream from stdin as per bug :bugzilla-rs:`1124` * :file:`raw2tiff.c`: Do not set ``RowsPerStrip`` larger than ``ImageLength``. As per bug :bugzilla-rs:`1110` Contributed software changes ---------------------------- None. Changes in TIFF v3.9.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.0 (:tag:`Release-v3-9-0`) Previous Version :doc:`v3.9.0beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * All of the major changes since 3.8.0 were incorporated in the v3.9.0beta release. This is a stable release from a stable maintenance branch which incorporates many bug and security fixes needed by existing users of 3.X.X series libraries. Any future major changes will be in the 4.0.X series of releases. Software configuration changes ------------------------------ * Updated autotools: Autoconf 2.64, Automake 1.11, libtool 2.2.6. * Enabled support for Automake silent build rules (``--enable-silent-rules`` or ``make V=0``) * Enabled support for Automake colorized tests. * Added detection of a 64-bit integer type so that bundled utilities (like :program:`tiffcrop`) can use it when necessary. Note that this version of libtiff does not require a 64-bit integer type but libtiff 4.0 does. Library changes --------------- * :file:`libtiff/Makefile.am`, :file:`libtiff/Makefile.v`: Do not distribute :file:`tiffconf.h`, remove :file:`tif_config.h`/:file:`tiffconf.h` during cleaning. As per bug :bugzilla-rs:`1573` * :file:`tif_dirinfo.c`: :c:func:`_TIFFMergeFields()` now only merges in field definitions that are missing. Existing definitions are silently ignored. (:bugzilla-rs:`1585`) * :file:`tif_write.c`: Rip out the fancy logic in :c:func:`TIFFAppendToStrip` for establishing if an existing tile can be rewritten to the same location by comparing the current size to all the other blocks in the same directory. This is dangerous in many situations and can easily corrupt a file. (observed in esoteric GDAL situation that's hard to document). This change involves leaving the :c:expr:`stripbytecount[]` values unaltered till :c:func:`TIFFAppendToStrip`. Now we only write a block back to the same location it used to be at if the new data is the same size or smaller - otherwise we move it to the end of file. * :file:`tif_dirwrite.c`: Try to avoid writing out a full readbuffer of tile data when writing the directory just because we have :c:macro:`TIFF_BEENWRITING` at some point in the past. This was causing odd junk to be written out in a tile of data when a single tile had an interleaving of reading and writing with reading last. (highlighted by gdal :file:`autotest/gcore/tif_write.py` test 7.) * :file:`tif_predict.c`: use working buffer in :c:func:`PredictorEncodeTile` to avoid modifying callers buffer. :gdal-trac:`1965` * :file:`tif_predict.c`, :file:`tif_predict.h`, :file:`tif_lzw.c`, :file:`tif_zip.c`: Improvements so that predictor based encoding and decoding works in read-write update mode properly. :gdal-trac:`1948` * :file:`configure.com`, :file:`libtiff/tif_vms.c`: Better OpenVMS support. Patches from Alexey Chupahin. * :file:`tif_fax3.c`: fix leak of ``FAXCS`` state (per bug :bugzilla-rs:`1603`). * :file:`tif_fax3.c`: Make :c:func:`find0span` and :c:func:`find1span` non-inline to make MSVC 6.0 compiler happy. * :file:`tif_codec.c`: Avoid :c:macro:`NULL` pointer dereferencing for exotic compression codec codes. * :file:`tif_dirread.c`: zero ``tif->tif_dir`` after freeing the directory in :c:func:`TIFFReadCustomDirectory`. I don't exactly remember why this was important. * :file:`tif_dirwrite.c`: Fix potential memory leak writing large double tags. * :file:`tif_dirread.c`: Fix unchecked :c:func:`malloc` result. * :file:`libtiff/tif_lzw.c`: Properly zero out the codetable. As per bug :bugzilla:`1929` * :file:`libtiff/tif_lzw.c`: Properly zero out the string table. Fixes :cve:`2008-2327` security issue. * :file:`libtiff/tif_jbig.c`: Support the JBIG-KIT 2.0 (compatibility with the older versions retained). * :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: removed all use of ``UaToAa`` and ``Bitmap16to8`` arrays in :c:struct:`TIFFRGBAImage` structure to restore ABI compatibility. These were just an attempt to speed up processing with precalculated tables. :bugzilla:`1979` * :file:`libtiff/tif_codec.c`: Avoid printing ``c->name`` if it does not exist. * :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: More ABI corrections. Removed ``SubsamplingHor/Ver`` from :c:struct:`TIFFRGBAImage` structure. :bugzilla:`1980` * :file:`libtiff/tif_jpeg.c`: Avoid errors if the application writes a full strip for the last partial strip in a jpeg compressed file. :bugzilla:`1981` * :file:`libtiff/tiffio.h`: GCC will now validate format specifications for :c:func:`TIFFError`, :c:func:`TIFFErrorExt`, :c:func:`TIFFWarning`, and :c:func:`TIFFWarningExt` in order to reveal bugs. Cleaned up resulting warnings throughout for 32 bit build only. * :file:`libtiff/tiffiop.h`: Add private type declarations for :c:type:`int64`, and :c:type:`uint64` so that bundled utilities (like :program:`tiffcrop`) can use it when necessary. * :file:`libtiff/tif_predict.c`: Add support for 32bit integer horz. predictors. :bugzilla:`1911` * :file:`libtiff/tif_luv.c`: Fix handling of tiled logluv images. :bugzilla:`2005` * :file:`libtiff/tif_write.c`: do not override the planar configuration to be contig for one sample files if planar configuration is already set. :bugzilla:`2057` * :file:`libtiff/tif_lzw.c`: Fix buffer underflow bug. :bugzilla:`2065` * :file:`libtiff/tif_luv.c`: correct return codes from ``encoderow`` to be 1 on success instead of zero. :bugzilla:`2069` * :file:`libtiff/tif_print.c` (:c:func:`TIFFPrintDirectory`): Applied patch for "tag error may cause segfault in tif_print.c." :bugzilla:`1896` Tools changes ------------- * :file:`tools/tiff2pdf.c`: Fixed setting of alpha value per report on list. * :file:`tools/tiffsplit.c`: Get rid of unsafe :c:func:`strcpy`/:c:func:`strcat` calls when doing the filename/path construction. * :file:`tools/tiff2pdf.c`: More appropriate format string in :c:func:`t2p_write_pdf_string`; avoid signed/unsigned mismatch. * :file:`tools/tiffsplit.c`: Use dynamically allocated array instead of static when constructing output file names. * :file:`tools/tiffcrop.c`, :file:`man/tiffcrop.1`: Incorporated significant functionality update from Richard Nolde. * :file:`tools/tiff2ps.c`: Incorporated significant functionality update from Richard Nolde. In particular, support for rotating the image by 90, 180, 270, and 'auto' has been added. * :file:`tools/tiff2ps.c`: Remove spurious message printed to ``stderr``. * :file:`tools/tiffsplit.c`: fix ``sampleformat`` to be :c:type:`shortv` instead of :c:type:`longv`. * :file:`tools/rgb2ycbcr.c`, :file:`tools/tiff2rgba.c`: Applied patch for :cve:`2009-2347` libtiff: integer overflows in various inter-color space conversion tools. :bugzilla:`2079` Contributed software changes ---------------------------- * None Changes in TIFF v3.9.0beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.0beta (:tag:`Release-v3-9-0beta`) Previous Version :doc:`v3.8.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * New :program:`tiffcrop` utility contributed by Richard Nolde. :program:`tiffcrop` does the same as :program:`tiffcp`, but also can crop, extract, rotate and mirror images. * :file:`tif_jbig.c`: Added support for JBIG compression scheme (34661 code), contributed by Lee Howard. * Totally new implementation of OJPEG module from Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files should be supported now that was not supported previously. Software configuration changes ------------------------------ * :file:`tif_config.wince.h`, :file:`tiffconf.wince.h`, :file:`tif_wince.c`: WinCE-specific compatibility stuff from Mateusz Loskot. * Rename :file:`config.h.vc` and :file:`tif_config.h.vc` to :file:`config.vc.h` and :file:`tif_config.vc.h` for easier identification by folks using an IDE. * :file:`configure`, :file:`configure.ac`: OJPEG support enabled by default (i.e., when conformant JPEG support is enabled). * :file:`README.vms`, :file:`Makefile.am`, :file:`configure.com`, :file:`libtiff/Makefile.am`, :file:`libtiff/tif_config.h-vms`, :file:`libtiff/tif_stream.cxx`, :file:`libtiff/tif_vms.c`, :file:`libtiff/tiffconf.h-vms`: Added support for OpenVMS by Alexey Chupahin. * :file:`nmake.opt`: use ``/EHsc`` for VS2005 compatibility. Also define :c:macro:`_CRT_SECURE_NO_DEPRECATE` to avoid noise on VS2005. Library changes --------------- * :file:`tif_dirinfo.c` (:c:func:`_TIFFFindFieldInfo`): Don't attempt to :c:func:`bsearch` on a :c:macro:`NULL` fieldinfo list. (:c:func:`_TIFFFindFieldInfoByName`): Don't attempt to :c:func:`lfind` on a :c:macro:`NULL` fieldinfo list. * :file:`tif_jpeg.c`: Changed :c:func:`JPEGInitializeLibJPEG` so that it will convert from decompressor to compressor or compress to decompress if required by the force arguments. This works around a problem in where the :c:func:`JPEGFixupTestSubsampling` may cause a decompressor to be setup on a directory when later a compressor is required with the force flag set. Occurs with the :program:`addtiffo` program for instance. * :file:`tif_dirwrite.c`: Fixed swapping of byte arrays stored in-place in tag offsets as per bug :bugzilla-rs:`1363` * :file:`tif_getimage.c`: workaround for "Fractional scanline" error reading OJPEG images with rowsperstrip that is not a multiple of vertical subsampling factor. This bug is mentioned in :bugzilla-rs:`1390` and ``_ * :file:`tif_dirread.c`: Added special function to handle ``SubjectDistance`` EXIF tag as per bug :bugzilla-rs:`1362` * :file:`tif_dirread.c`, :file:`tif_read.c`: Type of the byte counters changed from :c:type:`tsize_t` to :c:type:`uint32` to be able to work with data arrays larger than 2GB. Fixes bug :bugzilla-rs:`890`. Idea submitted by Matt Hancher. * :file:`tif_dir.c`: Workaround for incorrect TIFFs with ``ExtraSamples == 999`` produced by Corel Draw. As per bug :bugzilla-rs:`1490` * :file:`tif_write.c`: :c:func:`TIFFAppendToStrip` - clear sorted flag if we move a strip. :bugzilla-rs:`1359` * :file:`tif_fax3.c`: Save the state of printdir codec dependent method. * :file:`tif_jpeg.c`: Save the state of printdir codec dependent method as per bug :bugzilla-rs:`1273` * :file:`tif_win32.c`: Fixed problem with offset value manipulation as per bug :bugzilla-rs:`1322` * :file:`tif_fax3.c`, :file:`tif_next.c`, :file:`tif_pixarlog.c`: Fixed multiple vulnerabilities, as per Gentoo bug (): ``_ * :file:`tif_lzw.c`, :file:`tif_zip.c`: Fixed problems with mixing encoding and decoding on the same read-write TIFF handle. The LZW code can now maintain encode and decode state at the same time. The ZIP code will switch back and forth as needed. :bugzilla-rs:`757` * :file:`tif_msdos.c`: Avoid handle leak for failed opens. c/o Thierry Pierron * :file:`tif_dirwrite.c`: take care not to flush out buffer of strip/tile data in :c:func:`_TIFFWriteDirectory` if :c:macro:`TIFF_BEENWRITING` not set. Relates to bug report by Peng Gao with black strip at bottom of images. * :file:`tif_dirwrite.c`: make sure to use :c:type:`uint32` for wordcount in :c:func:`TIFFWriteNormalTag` if ``writecount`` is :c:macro:`VARIABLE2` for ASCII fields. It already seems to have been done for other field types. Needed for :program:`tiffset` on files with geotiff ascii text. * :file:`tif_dirinfo.c`: Added missed EXIF tag ``ColorSpace`` (40961). * :file:`tif_dirread.c`: Move IFD fetching code in the separate function :c:func:`TIFFFetchDirectory` avoiding code duplication in :c:func:`TIFFReadDirectory` and :c:func:`TIFFReadCustomDirectory`. * :file:`tif_readdir.c`: Added case in :c:func:`EstimateStripByteCounts` for tiled files. Modified :c:func:`TIFFReadDirectory` to not invoke :c:func:`EstimateStripByteCounts` for case where entry 0 and 1 are unequal but one of them is zero. :bugzilla-rs:`1204` * :file:`tif_open.c`, :file:`tif_dirread.c`, :file:`tiffiop.h`: Move IFD looping checking code in the separate function :c:func:`TIFFCheckDirOffset`. * :file:`tif_aux.c`: Added :c:func:`_TIFFCheckRealloc` function. * :file:`tif_fax3.c`: Fixed problems in fax decoder as per bug :bugzilla-rs:`1194` * :file:`tif_jbig.c`: Added support for JBIG compression scheme (34661 code) contributed by Lee Howard. As per bug :bugzilla-rs:`896`. * :file:`tif_getimage.c`: Added support for planarconfig separate non-subsampled YCbCr (i.e. separate YCbCr with subsampling ``[1,1]``). * :file:`tif_getimage.c`: Revision of all RGB(A) put routines: * Conversion of unassociated alpha to associated alpha now done with more performant LUT, and calculation more correct. * Conversion of 16bit data to 8bit data now done with more performant LUT, and calculation more correct * Bugfix of handling of 16bit RGB with unassociated alpha * :file:`tif_ojpeg.c`: totally new implementation * :file:`tif_getimage.c`: removed :c:macro:`TIFFTAG_JPEGCOLORMODE` handling of OJPEG images in favor of tif_getimage.c native handling of YCbCr and desubsampling. * :file:`tif_jpeg.c`: :c:func:`JPEGVSetField` so that altering the photometric interpretation causes the "upsampled" flag to be recomputed. Fixes peculiar bug where photometric flag had to be set before jpegcolormode flag. Tools changes ------------- * :file:`tiff2ps.c`: Added support 16-bit images as per bug :bugzilla-rs:`1566`. Patch from William Bader. * :file:`tiff2pdf.c`: Fix for :c:macro:`TIFFTAG_JPEGTABLES` tag fetching and significant upgrade of the whole utility as per bug :bugzilla-rs:`1560`. Now we don't need :file:`tiffiop.h` in :program:`tiff2pdf` anymore and will open output PDF file using :c:func:`TIFFClientOpen` machinery as it is implemented by Leon Bottou. * :file:`tiffcrop.c`: New tiffcrop utility contributed by Richard Nolde. As per bug :bugzilla-rs:`1383` * :file:`tiff2pdf.c`: Do not assume inches when the resolution units do not specified. As per bug :bugzilla-rs:`1366` * :file:`tiffset.c`: Properly handle tags with :c:macro:`TIFF_VARIABLE` writecount. As per bug :bugzilla-rs:`1350` * :file:`tif2rgba.c`: This utility does not work properly on big-endian architectures. It was fixed including the bug :bugzilla-rs:`1149` * :file:`tiff2pdf.c`: Fix handling of ``-q`` values. :bugzilla-rs:`587` * :file:`tiffcmp.c`: Fixed floating point comparison logic as per bug :bugzilla-rs:`1191` * :file:`tiff2pdf.c`: Fixed buffer overflow condition in :c:func:`t2p_write_pdf_string` as per bug :bugzilla-rs:`1196` Contributed software changes ---------------------------- * :file:`contrib/addtiffo/tif_overview.c`: Fix problems with odd sized output blocks in :c:func:`TIFF_DownSample_Subsampled` (:bugzilla-rs:`1542`). * :file:`contrib/dbs/xtiff/xtiff.c`: Make xtiff utility compilable. Though it is still far from the state of being working and useful. Changes in TIFF v3.9.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.1 (:tag:`Release-v3-9-1`) Previous Version :doc:`v3.9.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * This is a bug-fix release for several bugs (two of which are dire) which were discovered in the 3.9.0 release. Software configuration changes ------------------------------ * Several defines were missing from :file:`tif_config.vc.h` which are necessary to compile the library using MSVC. * Colorized tests were actually not enabled as expected. Parallel tests mode is now also enabled so that tests can be run in parallel, and test output is sent to :file:`.log` files. Library changes --------------- * :file:`libtiff/tif_write.c` (:c:func:`TIFFAppendToStrip`): Remove cast which caused libtiff to output a wrong last strip with byte-count and strip-offset of zero. This cast was added on the day of the 3.9.0 release. * :file:`libtiff/tif_dirwrite.c`: Back out changes from 2007-11-22 that resulted in the final strip not being written in some circumstances. :bugzilla:`2088` Tools changes ------------- None Contributed software changes ---------------------------- * None Changes in TIFF v3.9.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.2 (:tag:`Release-v3-9-2`) Previous Version :doc:`v3.9.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Fixes a number of bugs present in the 3.9.1 release. * OJPEG support updated to work with IJG JPEG 7 release. * :program:`tiffcrop` validated for most TIFF storage subformats and sample depths. Software configuration changes ------------------------------ * x86_64 now uses the same default fill order as i386. Library changes --------------- * Writing tags with an array value of type :c:enumerator:`TIFF_DOUBLE` now returns correct error status. The :c:macro:`TIFFTAG_SMINSAMPLEVALUE` and :c:macro:`TIFFTAG_SMAXSAMPLEVALUE` tags failed to write without this fix. * OJPEG decoder now works with IJG JPEG 7. Resolves "Bug 2090 - OJPEG crash with libjpeg v7". :bugzilla:`2090` * Eliminate most GCC "dereferencing type-punned pointer" warnings. Tools changes ------------- * New :program:`tiffcrop` from Richard Nolde. Major updates to add significant functionality for reading and writing tile based images with bit depths not a multiple of 8 which cannot be handled by :program:`tiffcp`. * Allow building tools with GCC using the ``-Wformat -Werror=format-security`` flags. Contributed software changes ---------------------------- * None Changes in TIFF v3.9.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.3 (:tag:`Release-v3-9-3`) Previous Version :doc:`v3.9.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Fixes for :cve:`2010-1411`. * Various reported bug fixes. Software configuration changes ------------------------------ * libtool is updated to version 2.2.10. Library changes --------------- * Fix a couple of issues that trigger failures in some cases when using :c:func:`TIFFReadScanline` with JPEG compressed subsampled ycbcr images. :bugzilla:`1936` * Ensure tile and scanline sizes are reset when moving to new directories. :bugzilla:`1936` * Do not generate a ``JPEGTables`` tag when creating the JPEG TIFF as is is not required in order to prevent it from being unused and filled with invalid data. (Leave it to be generated by later activity.) :bugzilla:`2135` * Don't return error on badly-terminated MMR strips. :bugzilla:`2029` * Have :c:macro:`TIFFTAG_REFERENCEBLACKWHITE` always print 6 floats instead of ``2*SamplesPerPixel``. :bugzilla:`2186` * Ensure that JPEG quality is always set in :c:func:`JPEGPreEncode`, not just when we want to output local tables. Otherwise the quality used during compression may not be right and might not match the tables in the tables tag. This bug only occurs when seeking between directories in the midst of writing blocks. :gdal-trac:`3539` * OJPEG: Report an error and avoid a crash if the input file is so broken that the strip offsets are not defined. * Eliminate FAX3 decoder buffer overrun possibility (:cve:`2010-1411`). * Restore ``ReferenceBlackWhite`` as a non-custom field. This avoids a multi-thread reentrancy problem as well as fixing output of wrong tag value due to redundant definitions for the same tag in the :c:expr:`tiffFieldInfo[]` array. Resolves :bugzilla:`2185` Tools changes ------------- * :program:`tiff2pdf`: Write the JPEG SOI headers into the TIFF strip data rather than skipping them. This fixes the ability to view in Acrobat Reader, Evince, and Ghostscript. :bugzilla:`2135` * :program:`ppm2tiff`: While case for parsing comment line requires extra parenthesis to work as expected. Reported by Thomas Sinclair. * :program:`tiffcp`: add a new option ``-x`` to force merged tiff file ``PAGENUMBER`` value in sequence for users who care the page sequence, this will also prevent :program:`tiff2pdf` from creating pdf file from the merged tiff file with wrong page sequence. * :program:`tiffcp`: Applied Tom Lane's patch to reject YCbCr subsampled data since :program:`tiffcp` currently doesn't support it. :bugzilla:`2097` Contributed software changes ---------------------------- * None Changes in TIFF v3.9.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.4 (:tag:`Release-v3-9-4`) Previous Version :doc:`v3.9.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Complete the fixes for :cve:`2009-2347`. * :program:`tiffcrop` now supports custom page sizes. Software configuration changes ------------------------------ * None. Library changes --------------- * Fixed inadequate validation of the ``SubjectDistance`` field. * Fixed bad handling of out of order tags definated late by a codec. * Avoid re-preparing jpeg tables unnecessarily. Tools changes ------------- * :program:`tiffcrop`: Added an option to allow the user to specify a custom page size on the command line. Fix the case where a page size specified with a fractional part was being coerced to an integer by retyping the variables that define the paper size. Corrected European page size dimensions. * :program:`tiff2rgba`: Completed fixes for ":cve:`2009-2347` libtiff: integer overflows in various inter-color space conversion tools". :bugzilla:`2079` * :program:`tiff2pdf`: Fix assorted bugs in :program:`tiff2pdf`: missing ``return`` in :c:func:`t2p_read_tiff_size` causes ``t2p->tiff_datasize`` to be set entirely wrong for :c:macro:`COMPRESSION_JPEG` case, resulting in memory stomp if actual size is larger. Also, there are a bunch of places that try to :c:func:`memset` a malloc'd buffer before checking for malloc failure, which would result in core dump if there actually were a failure. Contributed software changes ---------------------------- * None Changes in TIFF v3.9.5 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.5 (:tag:`Release-v3-9-5`) Previous Version :doc:`v3.9.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * :file:`configure.ac`: Should use ``AC_CANONICAL_HOST`` since host specifies the run-time target whereas target is used to specify the final output target if the package is a build tool (like a compiler), which libtiff is not. Resolves :bugzilla:`2307` "Use AC_CANONICAL_HOST macro". Library changes --------------- * :file:`libtiff/tif_getimage.c`: Check the number of samples per pixel when working with YCbCr image in :c:func:`PickContigCase`. As per bug :bugzilla:`2216` * :file:`libtiff/tif_dir.c`: Set the bogus post-decoding hook when processing :c:macro:`TIFFTAG_BITSPERSAMPLE` in :c:func:`_TIFFVSetField` for the case of 8 bit when we don't need any post-processing. That helps to reset the hook if we previously set this field to some other value and the hook was initialized accordingly. As per bug :bugzilla:`2035` * :file:`libtiff/tif_getimage.c`: Avoid wrong math du to the signed/unsigned integer type conversions. As per bug :bugzilla:`2207` * :file:`libtiff/tif_dirinfo.c`: Don't use assertions in :c:func:`_TIFFFieldWithTag` and :c:func:`_TIFFFieldWithName` if the tag is not found in the tag table. This should be normal situation and returned :c:macro:`NULL` value should be properly handled by the caller. * :file:`libtiff/{tif_dirwrite.c, tif_print.c}`: Properly handle ``DotRange`` tag as it can be either byte or short size and should be set and read by value, not as an array. As per bug :bugzilla:`2116` * :file:`libtiff/tif_dirread.c`: Really reset the tag count in :c:func:`CheckDirCount` to expected value as the warning message suggests. As per bug :bugzilla:`1963` * :file:`libtiff/tif_open.c`: Fix mode check before opening a file. :bugzilla:`1906` * :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`: apply patch for :cve:`2010-3087` per bug :bugzilla:`2140` * :file:`libtiff/tif_dirread.c`: fix crash when reading a badly-constructed TIFF per :bugzilla:`1994` * :file:`libtiff/tif_ojpeg.c`: fix buffer overflow on problem data :bugzilla:`1999` * :file:`libtiff/tif_dirread.c`: modify warnings :bugzilla:`2016` * :file:`libtiff/tif_jpeg.c`: fix use of clumplines calculation :bugzilla:`2149` * :file:`libtiff/tif_color.c`: prevent crash in handling bad TIFFs resolves :cve:`2010-2595`, :bugzilla:`2208` * :file:`libtiff/tif_dirread.c`: fix needless tag ordering warning :bugzilla:`2210` * :file:`libtiff/tif_jpeg.c`: reduce usage of ``JCS_UNKNOWN`` in order to improve compatibility with various viewers submitted by e-mail from `Dwight Kelly `_ * :file:`libtiff/tif_strip.c`: use :c:func:`TIFFGetFieldDefaulted` instead of :c:func:`TIFFGetField` when we assume that it will succeed :bugzilla:`2215` * :file:`libtiff/tif_dirread.c`: tolerate some cases where ``FIELD_COLORMAP`` is missing :bugzilla:`2189` * :file:`libtiff/tif_jpeg.c`: Fix regressions with 2 and 3 band images caused by commit on 2010-12-14. Submitted by e-mail from `Even Rouault `_ * :file:`libtiff/tif_dirwrite.c`: Avoid undefined behaviour when casting from :c:expr:`float` to :c:expr:`unsigned int` in :c:func:`TIFFWriteRationalArray` as reported by Kareem Shehata. * :file:`libtiff/tif_fax3.h`: Protect against a fax ``VL(n)`` codeword commanding a move left. Without this, a malicious input file can generate an indefinitely large series of runs without ``a0`` ever reaching the right margin, thus overrunning our buffer of run lengths. Per :cve:`2011-0192`. This is a modified version of a patch proposed by Drew Yao of Apple Product Security. It adds an :c:func:`unexpected` report, and disallows the equality case, since emitting a run without increasing ``a0`` still allows buffer overrun. * :file:`libtiff/tif_fax3.h`: Fix to last change allowing zero length runs at the start of a scanline---needed for legal cases. * :file:`libtiff/tif_thunder.c`: Correct potential buffer overflow with thunder encoded files with wrong bitspersample set. The libtiff development team would like to thank Marin Barbella and TippingPoint's Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, :cve:`2011-1167`). :bugzilla:`2300` * :file:`libtiff/tiffiop.h`: avoid declaring :c:type:`int64`/:c:type:`uint64` on AIX with XLC where they are already available. (:bugzilla:`2301`) Tools changes ------------- * :file:`tools/tiffcrop.c`: Patch from Richard Nolde. Reject YCbCr subsampled data since tiffcrop currently doesn't support it. Fix JPEG support. * :file:`tools/tiffcp.c`: Initialize buffer arrays with zero to avoid referencing to uninitialized memory in some cases (e.g. when tile size set bigger than the image size). * :file:`tools/tiff2pdf.c`: Better generation of ID field in :c:func:`t2p_write_pdf_trailer`. Get rid of GCC aliasing warnings. * :file:`tools/tiff2pdf.c`: Fixed computation of the tile buffer size when converting JPEG encoded tiles. * :file:`tools/tiff2pdf.c`: Better handling of string fields, use static string buffers instead of dynamically allocated, use :c:func:`strncpy` instead of :c:func:`strcpy`, control the string lengths. * :file:`tools/tiff2bw.c`, :file:`tools/thumbnail.c`, :file:`tools/pal2rgb.c`: Fix the count for ``WhitePoint`` tag as per bug :bugzilla:`2042` * :file:`tools/tiffdump.c`: Use :c:func:`PrintData` function instead of :c:func:`PrintByte`/:c:func:`PrintShort`/:c:func:`PrintLong`. Should fix an issue reported at :bugzilla:`2116` * :file:`tools/tiffset.c`: Properly handle ``TIFFTAG_PAGENUMBER``, ``TIFFTAG_HALFTONEHINTS``, ``TIFFTAG_YCBCRSUBSAMPLING``, ``TIFFTAG_DOTRANGE`` which should be set by value. * :file:`tools/tiffdump.c`: Avoid integer overflows computing the buffer size for large directories. As per bug :bugzilla:`2218` * :file:`tools/tiff2pdf.c`: Fixed ID buffer filling in :c:func:`t2p_write_pdf_trailer`, thanks to Dmitry V. Levin. * :file:`tools/tiffcrop.c`: Patch from Richard Nolde to avoid a potentially unterminated buffer due to using an exceptionally long file name. * :file:`tools/tiff2ps.c`: improvements and enhancements from Richard Nolde with additional command line options for Document Title, Document Creator, and Page Orientation * :file:`tools/tiffsplit.c`: abort when reading a TIFF without a byte-count per :bugzilla:`1996` * :file:`tools/tiff2pdf.c`: add fill-page option :bugzilla:`2051` * :file:`tools/fax2ps.c`: replace unsafe :c:func:`tmpfile` with :c:func:`mkstemp` :bugzilla:`2118` * :file:`tools/tiff2pdf.c`: fix colors for images with RGBA interleaved data :bugzilla:`2250` * :file:`tools/tiffcrop.c`: new release by Richard Nolde :bugzilla:`2004` * :file:`tools/fax2ps.c`: be consistent with page-numbering :bugzilla:`2225` * :file:`tools/gif2tiff.c`: fix buffer overrun :bugzilla:`2270` * :file:`tools/fax2ps.c` (:c:func:`main`): Use :c:func:`tmpfile` rather than :c:func:`mkstemp` since it is much more portable. Tmpfile is included in ISO/IEC 9899:1990 and the WIN32 CRT. Contributed software changes ---------------------------- * None Changes in TIFF v4.0.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.0 (:tag:`Release-v4-0-0`) Previous Version :doc:`v3.9.5 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. Please consult the ChangeLog file in the source package for full change details. The following information is located here: Major changes ------------- BigTIFF support changes: * The ``options`` parameter in the :c:func:`TIFFOpen` and :c:func:`TIFFClientOpen` funcs has been extended. When creating new files, you can add option ``4`` to specify you want to create a ClassicTIFF file, though that is the default and the option is not strictly necessary. (As such, old calling code will continue to function and create ClassicTIFF files.) Or you can add option ``8`` to specify you want to create a BigTIFF file instead. This new option is also reflected in some of the tools we already upgraded. For instance, you can use the ``-8`` option on :program:`tiffcp` to have :program:`tiffcp` produce BigTIFF files instead of the default ClassicTIFF. (Whilst an additional option is provided for version selection when creating new files, no such option is necessary when reading TIFF files. LibTiff reads ClassicTIFF and BigTIFF both, and the application does not need to be aware which TIFF version an opened file is.) * Although the tag count in BigTIFF is 64bit, we restricted the count in the implementation to a much more reasonable size. This is necessary in current implementation, because all tag data gets read automatically in the IFD reading stage, so if there's half a dozen private tags with multiple gigabytes of data that causes considerable overhead even if the application level is never interested in these tags. Our choice to ignore tags with data longer then a certain sanity value is much needed as things stand. We also recommend to step away from writing tiles that are 8 kilobyte in their uncompressed form, or writing single-line strips, in really big files, resulting in mega's of tiles or strips. It's much more efficient to choose bigger tile or strip sizes, up to several megabyte if needed, and have a few kilo of tiles or strips instead. * Although it's rare, some application code does directly access file offsets. Some of these are automatically upgraded because they used the :c:type:`toff_t` type, others need to be aware that the datatype changed and need to start using :c:type:`toff_t` or :c:type:`uint64`. This impacts access to tags like the ``EXIF`` IFD tag, for example, or the ``SubIfds`` tag, or to ``StripOffsets`` or ``TileOffsets``, the return type of functions like :c:func:`TIFFCurrentDirOffset`, and a parameter type to functions like :c:func:`TIFFSetSubDirectory`. * Although it's rare, some application code does use structures like :c:struct:`TIFFHeader` or :c:struct:`TIFFDirEntry` that used to be an exact binary representation of TIFF structures. These need to change. The old TIFFHeader structure is replaced by the new TIFFHeaderClassic, TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact binary representation of the ClassicTIFF and BigTIFF header, and of the part that is common to both. There is no new equivalent for the old :c:struct:`TIFFDirEntry` structure (or more precisely, there is still a :c:struct:`TIFFDirEntry` structure, but it is changed, moved to library-private definition, and no longer an exact binary representation of the tag structure of either TIFF version). * Sizer functions, like :c:func:`TIFFTileSize` or :c:func:`TIFFScanlineSize` and the like, return a :c:func:`tmsize_t` value (:c:func:`tmsize_t` is defined as :c:type:`int32` on 32bit machines, and :c:type:`int64` on 64bit machines, and as such it is meant to represent signed memory sizes). This is because we figure 98% of the calling code uses the return value as sizes in allocations and the like. So, any overflow that is theoretically possible with BigTIFF when LibTiff is running on a 32bit system, is best detected inside the sizer functions and it is best to return a type that makes sense as a memory size. If your calling code is the exception and is interested in actual file size, you best use the newer :c:func:`TIFFTileSize64` or :c:func:`TIFFScanlineSize64` function that returns an :c:type:`uint64` type. * These TIFF tags require a 64-bit type as an argument in libtiff 4.0.0: * :c:macro:`TIFFTAG_FREEBYTECOUNTS` * :c:macro:`TIFFTAG_FREEOFFSETS` * :c:macro:`TIFFTAG_STRIPBYTECOUNTS` * :c:macro:`TIFFTAG_STRIPOFFSETS` * :c:macro:`TIFFTAG_TILEBYTECOUNTS` * :c:macro:`TIFFTAG_TILEOFFSETS` Other important backward incompatible changes in the public API: * :c:func:`TIFFRewriteField` renamed into :c:func:`_TIFFRewriteField` and moved out from the public interface (from :file:`tiffio.h` to :file:`tiffiop.h`). Type of its ``count`` parameter changed from :c:type:`uint32` to :c:type:`tmsize_t`. * :c:func:`TIFFMergeFieldInfo` returns non-void result now. It returns 0 if successful and -1 if failed. Though this is now obsoleted function and should not be used in new programs. Use the new tag extension scheme instead. * :c:func:`TIFFFieldWithTag` and :c:func:`TIFFFieldWithName` functions now return pointer to :c:struct:`TIFFField` constant object instead of :c:struct:`TIFFFieldInfo`. * :c:func:`TIFFReassignTagToIgnore` function and :c:enum:`TIFFIgnoreSense` enumeration have been removed. They was unused and never been used properly. Should be unneeded for high-level applications. * :c:struct:`TIFFTagValue` structure removed from the public :file:`tiffio.h` to private :file:`tif_dir.h` and not accessible anymore. It should be unneeded for high-level applications. Software configuration changes ------------------------------ Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool 2.4. * Enabled support for Automake silent build rules (``--enable-silent-rules`` or ``make V=0``) * Enabled support for Automake colorized and parallel tests. * Added detection of 64-bit integer types since libtiff 4.0 requires use of 64-bit signed and unsigned integer types. * Libtiff now provides a more comprehensive test suite with over 72 tests, which may be executed on Unix-like systems, or under Microsoft Windows using MinGW/MSYS or Cygwin. * ``--disable-lzma`` configure option to disable use of liblzma. * ``--enable-defer-strile-load`` configure option to enable experimental deferred strip/tile offset/size loading. May cause some extremely sophisticated uses of libtiff to fail. * ``--enable-chunky-strip-read`` configure option to enable experimental enable reading large strips in chunks in :c:func:`TIFFReadScanline`. * Now always uses WIN32 native I/O functions for Microsoft Windows except for under Cygwin. * Now provides a pkg-config support file (libtiff-4.pc). Library changes --------------- * Patches/fixes made to stable libtiff (v3.9.X) are also applied to 4.0.0. There are too many to list here. See the distribution :file:`ChangeLog` for a detailed change list. * There is considerable change in some files like :c:func:`tif_dirread` and :c:func:`tif_dirwrite`. These changes don't impact backwards compatibility, they are mostly a clean rewrite that does allow BigTIFF support as well as somewhat more robust reading of the unexpected already and will also serve future API extension but does not impact current API or functionality in a negative way that you need to know about. * Although there is still a functional definition for types like :c:type:`toff_t` (file offset), :c:type:`tstrip_t` (strip index number), etc, we recommend against using these in newer code. We have learned that it is next to impossible to use these consistently and make real abstraction of the binary format of these types. Instead, at a certain level we always end up doing casts anyway, and taking the exact binary format into account, so these types are nothing but dangerously misleading and obfuscating. You do not need to update calling code that uses them, as 99.9% of such code will continue to work. But we recommend against using them in newer calling code, and we started replacing them with binary clear types like :c:type:`uint16`, :c:type:`uint32` and such in the library. * We do use and will continue to use one functional type that is an exception to the above rule, being :c:type:`tmsize_t`. This is a signed memory size type, i.e. it is :c:type:`int32` on 32bit machines, or :c:type:`int64` on 64bit machines. * Optionally support LZMA compression via TIFF tag 34925. :program:`tiffcp` supports compression levels similar to ``-c lzma:p1`` or ``-c zip:p9`` for setting the LZMA compression parameters. * Optionally defer the load of strip/tile offset and size tags for optimized scanning of directories. Enabled with the ``--enable-defer-strile-load`` configure option (:c:macro:`DEFER_STRILE_LOAD` ``#define`` in :file:`tif_config.h`). * Optionally enable experimental support for reading big strips in chunks. Enabled with the ``--enable-chunky-strip-read`` configure option. Tools changes ------------- * :program:`tiffset`: add ``-d`` and ``-sd`` switches to allow operation on a particular directory, not just the first. Contributed software changes ---------------------------- * None Changes in TIFF v4.0.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.1 (:tag:`Release-v4-0-1`) Previous Version :doc:`v4.0.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * ``--enable-ld-version-script``: New :program:`configure` option to enable shared library symbol versioning on ELF-based systems (e.g. Linux and FreeBSD) which use the GNU linker. This allows multiple major versions of libtiff to be loaded simultaneously into the same application or library without conflict, as long as all libtiffs involved are built with versioned symbols. This option is not enabled by default. * Added libtiff private dependency on ``-llzma`` for pkg-config. Library changes --------------- * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`: Extra caution around assumption tag fetching is always successful. * :file:`libtiff/tif_jpeg.c`: Extra caution for case where :c:var:`sp` is :c:macro:`NULL`. Tools changes ------------- * None Contributed software changes ---------------------------- * None Changes in TIFF v4.0.10 ======================= .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.10 (:tag:`v4.0.10`) Previous Version :doc:`v4.0.9 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at `Gitlab `_. This is the first release to be made from the new Git repository. Software configuration changes ------------------------------ * Minimum CMake version is now v2.8.11 for the CMake-based build. * Libwebp will be automatically detected and used by configure/cmake if present. * Libzstd will be automatically detected and used by configure/cmake if present. Library changes --------------- * Added ZSTD compression codec. `Zstandard `_ or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios. It's backed by a very fast entropy stage, provided by Huff0 and FSE library. We require libzstd >= 1.0.0 so as to be able to use streaming compression and decompression methods. The default compression level we have selected is 9 (range goes from 1 to 22), which experimentally offers equivalent or better compression ratio than the default deflate/ZIP level of 6, and much faster compression. For example on a 6600×4400 16bit image, ``tiffcp -c zip`` runs in 10.7 seconds, while ``tiffcp -c zstd`` runs in 5.3 seconds. Decompression time for zip is 840 ms, and for zstd 650 ms. File size is 42735936 for zip, and 42586822 for zstd. Similar findings on other images. On a 25894×16701 16bit image: .. table:: Compressor Relative Performance :widths: auto =========== ================ ================== =========== Compressor Compression time Decompression time File size =========== ================ ================== =========== ZSTD 35 s 3.2 s 399,700,498 ZIP/Deflate 1m 20 s 4.9 s 419,622,336 =========== ================ ================== =========== Please note that ``COMPRESSION_ZSTD`` is self-assigned the id 50000 by the libtiff project and is not officially registered with Adobe since Adobe's registration function is defunct. * Added WebP compression codec. `WebP `_ is a high performance compressor intended for photos as commonly used on the Web. The WebP encoder is not designed for huge images, but serves very well for compressing strips and tiles in TIFF as long as the strips or tiles do not exceed the capability of the encoder. As a test of compression performance metrics, GraphicsMagick was used on an extremely high quality 8-bit TIFF image from a Hasselblad H4D-200MS camera with pixel dimensions of 16352×12264. The image was re-encoded with 1024×1024 tiles and various compression algorithms, using default settings for each algorithm. Based on this test, the compression and decompression performance (in iterations per second), the resulting file size, and the calculated total PSNR are provided here. It can be seen that WebP provided excellent encode and decode performance, and the compressed file size was very small: .. table:: Compressor Relative Performance :widths: auto ========== ============ ============= ========= ===== Compressor Compression Decompression File size PSNR ========== ============ ============= ========= ===== None 0.536 iter/s 1.506 iter/s 576.03MiB ∞ LZW 0.105 iter/s 0.266 iter/s 270.68MiB ∞ ZStd 0.020 iter/s 0.518 iter/s 238.42MiB ∞ LZMA 0.009 iter/s 0.056 iter/s 247.61MiB ∞ ZIP 0.009 iter/s 0.301 iter/s 247.88MiB ∞ JPEG 0.446 iter/s 0.760 iter/s 18.59MiB 39.00 WebP 0.019 iter/s 0.330 iter/s 9.38MiB 37.78 ========== ============ ============= ========= ===== Please note that ``COMPRESSION_WEBP`` is self-assigned the id 50001 by the libtiff project and is not officially registered with Adobe since Adobe's registration function is defunct. * :c:func:`TIFFPrintDirectory`: fix null pointer dereference on corrupted file. Fixes :bugzilla:`Bug 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF image <2770>`. * :c:func:`_TIFFVGetField`: fix heap out-of-bounds access when requesting ``TIFFTAG_NUMBEROFINKS`` on a EXIF directory. Fixes :bugzilla:`Bug 2765 - Heap Out-Of-Bounds Memory Access - 68122422 <2765>`. Reported by Google Autofuzz project. * Fix a memory leak in :c:func:`TIFFStreamOpen`. :c:func:`TIFFStreamOpen` allocates a new ``tiff{o,i}s_data``, but if :c:func:`TIFFClientOpen` fails then that struct is leaked. * Fix for bug 2772. It is possible to craft a TIFF document where the IFD list is circular, leading to an infinite loop while traversing the chain. The libtiff directory reader has a failsafe that will break out of this loop after reading 65535 directory entries, but it will continue processing, consuming time and resources to process what is essentially a bogus TIFFdocument. This change fixes the above behavior by breaking out of processing when a TIFF document has >= 65535 directories and terminating with an error. * :c:func:`ChopUpSingleUncompressedStrip`: avoid memory exhaustion (:cve:`2017-11613`). In :c:func:`ChopUpSingleUncompressedStrip`, if the computed number of strips is big enough and we are in read only mode, validate that the file size is consistent with that number of strips to avoid useless attempts at allocating a lot of memory for the :c:member:`td_stripbytecount` and :c:member:`td_stripoffset` arrays. Fixes :bugzilla:`Bug 2724 - memory exhaustion in ChopUpSingleUncompressedStrip <2724>`. * Port code: Add :c:func:`strtol`, :c:func:`strtoll` and :c:func:`strtoull`. Also update :c:func:`strtoul`. All use the same implementation from NetBSD libc. * Fix for :cve:`2018-7456` "NULL pointer dereference in :c:func:`TIFFPrintDirectory`". * :c:func:`TIFFWriteDirectorySec`: avoid assertion. Fixes :bugzilla:`Bug 2795 - There is a reachable assertion abort in function TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead to remote denial of attack. (:cve:`2018-10963`) <2795>`. * :c:func:`LZWDecodeCompat`: fix potential index-out-of-bounds write. Fixes :bugzilla:`Bug 2780 - A heap-buffer-overflow in function LZWDecodeCompat in libtiff4.0.9 (:cve:`2018-8905`) <2780>`. The fix consists in using the similar code as :c:func:`LZWDecode` to validate we don't write outside of the output buffer. * Remove builtin support for GUI warning and error message boxes. Now warnings always go to the console by default unless applications define their own warning and error handlers. GUI applications (and Windows CE) are required to define such handlers. * Add tag and pseudo-tag definitions for ESRI LERC codec (out of tree codec whose source is at ``_. * Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API Fixes :bugzilla:`Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode <2800>`. * :c:func:`TIFFSetupStrips`: avoid potential :c:type:`uint32` overflow on 32-bit systems with large number of strips. Probably relates to :bugzilla:`Bug 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c (:cve:`2018-10779`) <2788>`. * Fix out-of-bound read on some tiled images. * Avoid potential :c:type:`int32` overflows in :c:func:`multiply_ms`. * Only read/write ``TIFFTAG_GROUP3OPTIONS`` or ``TIFFTAG_GROUP4OPTIONS`` if compression is ``COMPRESSION_CCITTFAX3`` or ``COMPRESSION_CCITTFAX4``. * JBIG: fix potential out-of-bounds write in :c:func:`JBIGDecode`. Also fix a (harmless) potential use of uninitialized memory when ``tif->tif_rawsize > tif->tif_rawcc``. In case libtiff is compiled with ``CHUNKY_STRIP_READ_SUPPORT``, make sure that whole strip data is provided to :c:func:`JBIGDecode`. * :c:func:`LZMAPreEncode`: emit verbose error if :c:func:`lzma_stream_encoder` fails (typically because not enough memory available) Tools changes ------------- * :program:`tiff2pdf`: Fix :cve:`2017-9935`, :bugzilla:`Bug 2704 - There is a heap based buffer overflow in the tiff2pdf tool of the libtiff library. A crafted TIFF document can lead to a heap based buffer overflow resulting in multiple damages. <2704>`. * :program:`pal2rgb`: Add workaround to pal2rgb buffer overflow. * :program:`tiffset`: Add support for :c:macro:`LONG8`, :c:macro:`SLONG8` and :c:macro:`IFD8` field types * :program:`tiff2bw`: avoid null pointer dereference in case of out of memory situation. Fixes :bugzilla:`Bug 2819 - There is a NULL pointer dereference at function LZWDecode in libtiff 4.0.9 (:cve:`2018-18661`) <2819>`. Contributed software changes ---------------------------- None Changes in TIFF v4.0.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.2 (:tag:`Release-v4-0-2`) Previous Version :doc:`v4.0.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here Major changes ------------- * None Software configuration changes ------------------------------ * None Library changes --------------- * :file:`tif_getimage.c`: added support for _SEPARATED CMYK images. * :file:`tif_getimage.c`: Added support for greyscale + alpha. * Added :c:func:`TIFFCreateCustomDirectory` and :file:`TIFFCreateEXIFDirectory` functions. * :file:`tif_print.c`: Lots of fixes around printing corrupt or hostile input. * Improve handling of corrupt ycbcrsubsampling values. * :file:`tif_unix.c`: use :c:func:`strerror` to get meaningful error messages. * :file:`tif_jpeg.c`: fix serious bugs in :c:func:`JPEGDecodeRaw`. * :file:`tif_jpeg.c`: Fix size overflow (zdi-can-1221, :cve:`2012-1173`). Tools changes ------------- * :program:`tiff2pdf`: Defend against integer overflows while calculating required buffer sizes (:cve:`2012-2113`). Contributed software changes ---------------------------- * None Changes in TIFF v4.0.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.3 (:tag:`Release-v4-0-3`) Previous Version :doc:`v4.0.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * Updated to use Automake 1.12.4. Avoids security problem with ``make distcheck`` (:cve:`2012-3386`). Library changes --------------- * Various memory buffer access fixes. * Fix handling when writing RGBA jpeg compressed imagery (:gdal-trac:`4732`). * Fix to work properly with IJG JPEG 7+. * New functions :c:func:`TIFFFieldTag`, :c:func:`TIFFFieldName`, :c:func:`TIFFFieldDataType`, :c:func:`TIFFFieldPassCount`, :c:func:`TIFFFieldReadCount`, :c:func:`TIFFFieldWriteCount` to use as external accessors for the opaque type :c:type:`TIFFField`. * Fix bug rewriting image tiles in a compressed file (:gdal-trac:`4771`). * Add TIFF/FX tag support in libtiff. Tools changes ------------- * :program:`tiff2pdf`: Fail when :c:func:`TIFFSetDirectory` fails. This prevents core dumps or perhaps even arbitrary code execution when processing a corrupt input file (:cve:`2012-3401`). * :program:`tiff2pdf`: Fix two places where :c:member:`t2p_error` didn't get set after a :c:func:`malloc` failure. No crash risk AFAICS, but the program might not report exit code 1 as desired. Contributed software changes ---------------------------- * None Changes in TIFF v4.0.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.4 (:tag:`Release-v4-0-4`) Previous Version :doc:`v4.0.4beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * :bugzilla:`2405`: Correct shell equality operator. * :bugzilla:`2498`: Adds an option to select the file I/O style on Windows hosts. Library changes --------------- * :c:func:`TIFFNumberOfDirectories`: Coverity 1134470 "Logically dead code" * :file:`tif_dirread.c`: * :c:func:`TIFFReadDirEntryDoubleArray`: Coverity 298626 "Logically dead code". * :c:func:`TIFFReadDirEntryFloatArray`: Coverity 298627 "Logically dead code". * :c:func:`TIFFReadDirEntryIfd8Array`: Coverity 298628 "Logically dead code". * :c:func:`TIFFReadDirEntrySlong8Array`: Coverity 298629 "Logically dead code" * :file:`tif_dirwrite.c` * :c:func:`_TIFFRewriteField`: Coverity 1024310 "Resource leak". * :file:`tif_jpeg.c` * :c:func:`JPEGCleanup`: Coverity 298624 "Dereference before null check". * :c:func:`JPEGDecode`: Coverity 602597 "Operands don't affect result". * :file:`tif_getimage.c` * :bugzilla:`2409`: Correct reading of certain tiled TIFFs. * :file:`tif_luv.c` * :c:func:`LogLuvDecodeStrip`: Coverity 991239 "Division or modulo by zero". * :c:func:`LogLuvDecodeTile`: Coverity 991227 "Division or modulo by zero". * :c:func:`LogLuvEncodeStrip`: Coverity 991240 "Division or modulo by zero". * :c:func:`LogLuvEncodeTile`: Coverity 991241 "Division or modulo by zero". * :file:`tif_lzw.c` * Decode files that contain consecutive :c:macro:`CODE_CLEAR` codes. * :file:`tif_ojpeg.c` * :c:func:`OJPEGReadBufferFill`: Coverity 603400 "Missing break in switch". * :c:func:`OJPEGReadHeaderInfoSecStreamDht`: Coverity 601720 "Resource leak". * :file:`tif_read.c` * :c:func:`TIFFStartTile`: Coverity 715973 and 715974 "Division or modulo by zero". * :file:`tif_unix.c` * :bugzilla:`2510`: Fix several harmless but still annoying warnings. * :file:`tif_write` * :c:func:`TIFFWriteEncodedStrip`: Coverity 715975 "Division or modulo by zero". * :c:func:`TIFFWriteEncodedTile`: Coverity 715976 and 715977 "Division or modulo by zero". * :c:func:`TIFFWriteRawStrip`: Coverity 715978 "Division or modulo by zero". * :c:func:`TIFFWriteScanline`: Coverity 715979 "Division or modulo by zero". Tools changes ------------- * :program:`bmp2tiff` * Coverity 1024225 "Untrusted value as argument". * Coverity 1024678 "Unchecked return value from library". * Coverity 1024679 "Unchecked return value from library". * Coverity 1214160 "Ignoring number of bytes read". * :program:`gif2tiff` * Coverity 1024222 "Untrusted value as argument". * Coverity 1024890 "Ignoring number of bytes read". * Coverity 1024891 "Ignoring number of bytes read". * Coverity 1024892 "Ignoring number of bytes read". * Coverity 1024893 "Ignoring number of bytes read". * Coverity 1024894 "Ignoring number of bytes read". * :program:`ras2tiff` * Corrected Sun Raster header definition to be safe for 64-bit systems. Add some header validations. Fixes many (unspecified) Coverity issues. * Coverity 1024223 "Untrusted value as argument". * Coverity 1301206: "Integer handling issues (BAD_SHIFT)". * :program:`raw2tiff` * Coverity 1024887 "Unchecked return value from library". * Coverity 1024888 "Unchecked return value from library". * Coverity 1024889 "Unchecked return value from library". * Coverity 1214162 "Ignoring number of bytes read". * :program:`tiff2pdf` * :bugzilla:`2078`: Suppress initial output of the header. * :bugzilla:`2150`: Change ColorTransform from "0" to "1". * Take care in using the return value from :c:func:`snprintf`. * Coverity 1024181 "Structurally dead code". * Coverity 1024181 "Structurally dead code". * Coverity 1227690 "Unused value". * Coverity 298621 "Resource leak". * :program:`tiff2ps` * Correct sizing and scaling problems with output document. * :program:`tiffcp` * Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak". * :program:`tiffcrop` * Correctly copy the compression tag from the source TIFF. * Coverity 1024545 "Division or modulo by zero". * Coverity 1024586 "Logically dead code". * Coverity 1024796 "Nesting level does not match indentation". * Coverity 1024797 "Nesting level does not match indentation". * Coverity 1294542 "Logical vs. bitwise operator". * Coverity 1299740 "Out-of-bounds write". * Coverity 1299741 "Dereference before null check". * :program:`tiffdither` * Check memory allocations for failure. Also check multiplication overflow. (Fixes #2501, :cve:`2014-8128`) * :program:`tiffgt.c` * :bugzilla:`2401`: Appropriately call :c:func:`glFlush`. * :program:`tiffmedian` * Coverity 1024386 "Out-of-bounds read". * Coverity 1024386 "Out-of-bounds read". * Coverity 1024795 "Nesting level does not match indentation". * Coverity 1024795 "Nesting level does not match indentation". :program:`tiffsplit` * Coverity 1024304 "Resource leak". * Coverity 1024305 "Resource leak". Contributed software changes ---------------------------- * :program:`addtiffo` * Check buffer size calculation for overflow. * Coverity 298615 "Resource leak". * Coverity 1024649 "Unintended sign extension". * :program:`iptcutil` * Coverity 1024468 "Infinite loop". * Coverity 1024727 "Truncated stdio return value". * Coverity 1214240 "Untrusted loop bound". Changes in TIFF v4.0.4beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.4beta (:tag:`Release-v4-0-4beta`) Previous Version :doc:`v4.0.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * Updated to use Automake 1.15 and Libtool 2.4.5 Library changes --------------- * :c:func:`TIFFCheckDirOffset`: avoid :c:type:`uint16` overflow when reading more than 65535 directories, and effectively error out when reaching that limit. * :c:func:`TIFFNumberOfDirectories`: generate error in case of directory count overflow. * :c:func:`TIFFAdvanceDirectory`: If nextdir is found to be defective, then set it to zero before returning error in order to terminate processing of truncated TIFF. * JPEG-in-TIFF: recognize ``SOF2``, ``SOF9`` and ``SOF10`` markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. Note: the default settings of mozjpeg will produce progressive scans, which is forbidden by the TechNote. * JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused all tiles/strips to include quantization tables even when the jpegtablesmode had the :c:macro:`JPEGTABLESMODE_QUANT` bit set. Also add explicit removal of Huffman tables when jpegtablesmode has the :c:macro:`JPEGTABLESMODE_HUFF` bit set, which avoids Huffman tables to be emitted in the first tile/strip (only useful in update scenarios. create-only was fine) * JPEG-in-TIFF: fix segfault in :c:func:`JPEGFixupTagsSubsampling` on corrupted image where ``tif->tif_dir.td_stripoffset == NULL``. (:bugzilla:`2471`) * NeXT codec: add new tests to check that we don't read outside of the compressed input stream buffer. * NeXT codec: check that ``BitsPerSample`` = 2. Fixes :bugzilla:`2487` (:cve:`2014-8129`) * NeXT codec: in the "run mode", use tilewidth for tiled images instead of imagewidth to avoid crash * tif_getimage.c: in OJPEG case, fix checks on strile width/height in the ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile`` and ``putcontig8bitYCbCr21tile`` cases. * in :c:func:`TIFFDefaultDirectory`, reset any already existing extended tags installed by user code through the extender mechaninm before calling the extender callback (GDAL #5054) * Fix warnings about unused parameters. * Fix various typos in comments found by Debian lintian tool (GDAL #5756) * tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. (:bugzilla:`2235`) * :file:`tif_dirread.c`: In :c:func:`EstimateStripByteCounts`, check return code of :c:func:`_TIFFFillStriles`. This solves crashing bug on corrupted images generated by afl. * :file:`tif_read.c`: fix several invalid comparisons of a :c:type:`uint64` value with ``<= 0`` by casting it to :c:type:`int64` first. This solves crashing bug on corrupted images generated by afl. * :c:func:`TIFFSetField`: refuse to set negative values for :c:macro:`TIFFTAG_XRESOLUTION` and :c:macro:`TIFFTAG_YRESOLUTION` that cause asserts when writing the directory * :c:func:`TIFFReadDirectory`: refuse to read ``ColorMap`` or ``TransferFunction`` if ``BitsPerSample`` has not yet been read, otherwise reading it later will cause user code to crash if ``BitsPerSample > 1`` * :c:func:`TIFFRGBAImageOK`: return FALSE if LOGLUV with ``SamplesPerPixel != 3``, or if CIELAB with ``SamplesPerPixel != 3`` or ``BitsPerSample != 8`` * :file:`tif_config.vc.h`: no longer use ``#define snprintf _snprintf`` with Visual Studio 2015 aka VC 14 aka MSVC 1900 * LZW codec: prevent potential null dereference of ``sp->dec_codetab`` in :c:func:`LZWPreDecode` (:bugzilla:`2459`) * :c:func:`TIFFReadBufferSetup`: avoid passing -1 size to :c:func:`TIFFmalloc` if passed user buffer size is 0 (:bugzilla:`2459`) * :c:func:`TIFFReadDirEntryOutputErr`: Incorrect count for tag should be a warning rather than an error since errors terminate processing. * :file:`tif_dirinfo.c` (``TIFFField``) : Fix data type for :c:macro:`TIFFTAG_GLOBALPARAMETERSIFD` tag. * Add definitions for TIFF/EP ``CFARepeatPatternDim`` and ``CFAPattern`` tags (:bugzilla:`2457`) * :file:`tif_codec.c`, :file:`tif_dirinfo.c`: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of ``sprintf(buf, ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)`` * :file:`configure.ac`: Improve pkg-config static linking by adding ``-lm`` to ``Libs.private`` when needed. * :file:`tif_write.c`: :c:type:`tmsize_t` related casting warning fixed for 64bit linux. * :file:`tif_read.c`: :c:type:`uint64`/:c:type:`tmsize_t` change for MSVC warnings. (:bugzilla:`2427`) * Fix :c:func:`TIFFPrintDirectory` handling of :c:member:`field_passcount` fields: it had the :c:macro:`TIFF_VARIABLE` and :c:macro:`TIFF_VARIABLE2` cases backwards. * PixarLog codec: Improve previous patch for :cve:`2012-4447` (to enlarge :c:member:`tbuf` for possible partial stride at end) so that overflow in the integer addition is detected. * :file:`tif_{unix,vms,win32}.c` (:c:func:`_TIFFmalloc`): ANSI C does not require :c:func:`malloc` to return :c:macro:`NULL` pointer if requested allocation size is zero. Assure that :c:func:`_TIFFmalloc` does. * :file:`tif_zip.c`: Avoid crash on :c:macro:`NULL` error messages. Tools changes ------------- * :program:`tiff2pdf` Fix various crashes and memory buffer access errors (oCERT-2014-013). * :program:`tiff2pdf` fix buffer overflow on some YCbCr JPEG compressed images. (:bugzilla:`2445`) * :program:`tiff2pdf` fix buffer overflow on YCbCr JPEG compressed image. (:bugzilla:`2443`) * :program:`tiff2pdf` check return code of :c:func:`TIFFGetField` when reading :c:macro:`TIFFTAG_SAMPLESPERPIXEL` * :program:`tiff2pdf` fix crash due to invalid tile count. * :program:`tiff2pdf` Detect invalid settings of ``BitsPerSample``/``SamplesPerPixel`` for CIELAB / ITULAB * :program:`tiff2pdf` Assure that memory size calculations for :c:func:`_TIFFmalloc` do not overflow the range of :c:type:`tmsize_t`. * :program:`tiff2pdf` Avoid crash when :c:macro:`TIFFTAG_TRANSFERFUNCTION` tag returns one channel, with the other two channels set to :c:macro:`NULL`. * :program:`tiff2pdf` close PDF file. (:bugzilla:`2479`) * :program:`tiff2pdf` Preserve input file directory order when pages are tagged with the same page number. * :program:`tiff2pdf.c` terminate after failure of allocating ycbcr buffer (:bugzilla:`2449`, :cve:`2013-4232`) * :program:`tiff2pdf` Rewrite JPEG marker parsing in :c:func:`t2p_process_jpeg_strip` to be at least marginally competent. The approach is still fundamentally flawed, but at least now it won't stomp all over memory when given bogus input. Fixes :cve:`2013-1960`. * :program:`tiffdump` Guard against arithmetic overflow when calculating allocation buffer sizes. * :program:`tiffdump` fix crash due to overflow of entry count. * :program:`tiffdump` Fix double-free bug. * :program:`tiffdump` detect cycle in TIFF directory chaining. (:bugzilla:`2463`) * :program:`tiffdump` avoid passing a :c:macro:`NULL` pointer to :c:func:`read` if :c:func:`seek` failed before. (:bugzilla:`2459`) * :program:`tiff2bw` when ``Photometric = RGB``, the utility only works if ``SamplesPerPixel = 3``. Enforce that. (:bugzilla:2485`, :cve:`2014-8127`) * :program:`pal2rgb`, :program:`thumbnail`: fix crash by disabling :c:macro:`TIFFTAG_INKNAMES` copying. (:bugzilla:`#2484`, :cve:`2014-8127`) * :program:`thumbnail` fix out-of-buffer write. (:bugzilla:`2489`, :cve:`2014-8128`) * :program:`thumbnail`, :program:`tiffcmp`: only read/write :c:macro:`TIFFTAG_GROUP3OPTIONS` or :c:macro:`TIFFTAG_GROUP4OPTIONS` if compression is :c:macro:`COMPRESSION_CCITTFAX3` or :c:macro:`COMPRESSION_CCITTFAX4`. (:bugzilla:`2493`, :cve:`2014-8128`) * :program:`tiffcp` fix crash when converting YCbCr JPEG-compressed to none. (:bugzilla:`2480`) * :program:`bmp2tiff` fix crash due to int overflow related to input BMP dimensions * :program:`tiffcrop` fix crash due to invalid ``TileWidth``/``TileHeight`` * :program:`tiffcrop` fix segfault if bad value passed to ``-Z`` option (:bugzilla:`2459`) and add missing ``va_end`` in :c:func:`dump_info` * :program:`thumbnail`, :program:`tiffcrop`: "fix" heap read over-run found with Valgrind and Address Sanitizer on test suite * :program:`fax2ps` check :c:func:`malloc`/:c:func:`realloc` result. (:bugzilla:`2470`) * :program:`gif2tiff` apply patch for :cve:`2013-4243`. (:bugzilla:`2451`) * :program:`gif2tiff` fix possible OOB write. (:bugzilla:`2452`, :cve:`2013-4244`) * :program:`gif2tiff` Be more careful about corrupt or hostile input files (:bugzilla:`2450`, :cve:`2013-4231`) * :program:`tiff2rgba` fix usage message in that zip was wrongly described * :program:`tiffinfo` Default various values fetched with :c:func:`TIFFGetField` to avoid being uninitialized. * :program:`tiff2ps` Fix bug in auto rotate option code. * :program:`ppm2tiff` avoid zero size buffer vulnerability (:cve:`2012-4564`). check the linebytes calculation too, get the :c:func:`max` calculation straight, avoid redundant error messages, check for :c:func:`malloc` failure. * :program:`tiffset` now supports a ``-u`` option to unset a tag. (:bugzilla:`2419`) * Fix warnings about unused parameters. * :program:`rgb2ycbcr`, :program:`tiff2bw`, :program:`tiff2pdf`, :program:`tiff2ps`, :program:`tiffcrop`, :program:`tiffdither`: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of ``sprintf(buf, ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to protect against overflow of fixed-size buffers. This responds in particular to :cve:`2013-1961` concerning overflow in :file:`tiff2pdf.c`'s :c:func:`t2p_write_pdf_page`. * :file:`html/man/tiff2ps.1.html`, :file:`html/man/tiffcp.1.html`, :file:`html/man/tiffdither.1.html`, :file:`man/tiff2ps.1`, :file:`man/tiffcp.1`, :file:`man/tiffdither.1`, :file:`tools/tiff2ps.c`, :file:`tools/tiffcp.c`, :file:`tools/tiffdither.c`: Sync tool usage printouts and man pages with reality Contributed software changes ---------------------------- * Fix warnings about variables set but not used. * :file:`contrib/dbs/xtiff/xtiff.c`: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of ``sprintf(buf, ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to protect against overflow of fixed-size buffers. Changes in TIFF v4.0.5 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.5 (:tag:`Release-v4-0-5`) Previous Version :doc:`v4.0.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Support for configure/build using CMake. * Support for large (> 2GB) files under Microsoft Windows. Software configuration changes ------------------------------ * :file:`CMakeLists.txt` / CMake * Configuration and building using CMake is now supported under Microsoft Windows and on Unix-type systems. * :file:`configure.ac` / :program:`configure` * Test for and use :c:func:`fseeko` if it is available. This allows supporting large files on Unix-type systems with a 32-bit :c:expr:`long` type and a 64-bit :c:type:`off_t` type. Library changes --------------- * :file:`tiffiop.h`: * Macros added to use 64-bit equivalents for all standard I/O and POSIX APIs used by libtiff and its tools which are limited to 2GB in Windows builds. Note that these 64-bit equivalents were introduced by the CRT provided with Visual Studio 2005 and if the necessary CRT is not installed on the target computer, the program will not run. The wrapper macros will not be activated unless the definition :c:macro:`_MSC_VER` is at least 1400 or :c:macro:``__MSVCRT_VERSION__`` is at least ``0x800``. * :file:`tif_unix.c`: * Updated to support large files under Microsoft Windows. This makes :file:`tif_unix.c` a completely viable candidate for use under Windows (in spite of its name) if the CRT is modern enough. Please note that :file:`tif_win32.c` already supported large files, but only :program:`tiffinfo` and :program:`tiffdump` made any provision to support large files under Windows. * :c:func:`_tiffReadProc` and :c:func:`_tiffWriteProc` are modified to chunk I/O to a maximum size of 2GB for extremely large I/O requests. This surmounts limitations in the Microsoft Windows :c:func:`read` and :c:func:`write` APIs (which are limited to the range of a 32-bit :c:expr:`int`), and may avoid poor behavior with extremely large I/O requests on other systems. Tools changes ------------- * All tools * Updated to use I/O wrapper macros from :file:`tiffiop.h` in order to support large files under Microsoft Windows. Contributed software changes ---------------------------- None Changes in TIFF v4.0.6 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.6 (:tag:`Release-v4-0-6`) Previous Version :doc:`v4.0.5 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Now builds with CMake 2.8.9 and newer (previously required 3.0.0) Software configuration changes ------------------------------ * :file:`CMakeLists.txt` / CMake * Supports CMake 2.8.9 and later. * Add missing file which wasn't being distributed, causing unit tests to fail. * Make shared/static library building configurable. * CMake reads all version information directly from :file:`configure.ac` to avoid duplication of values. * CMake builds are now included in ``distcheck`` target. * :file:`Makefile.am` * Autotools `make distcheck` now tests the CMake-based build if CMake is available. Library changes --------------- * Fixes to avoid undefined behaviour of signed types (C standard compliance). * Fixes to avoid possible isses when casting to unsigned char. * Fixes to avoid undefined behaviour with shifts. * Fix generation of output with 16 bit or 32 bit integer, when byte swapping is needed, in horizontal predictor (:bugzilla:`2521`). * Fix decoding when there is a single pixel to decode (unlikely case...) and byte swapping is involved. * Add add explicit masking with ``0xff`` before casting to :c:type:`uchar` in floating-point horizontal differencing and accumulation routines. * Eliminate requirement for and use of 64-bit constant values. Tools changes ------------- * :program:`tiffgt` * Silence glut API deprecation warnings on MacOS X. * :program:`fax2ps` * Detect failure to write to temporary file. Contributed software changes ---------------------------- None Changes in TIFF v4.0.7 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.7 (:tag:`Release-v4-0-7`) Previous Version :doc:`v4.0.6 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, :program:`ras2tiff`, :program:`sgi2tiff`, :program:`sgisv`, and :program:`ycbcr` are completely removed from the distribution. these tools were written in the late 1980s and early 1990s for test and demonstration purposes. In some cases the tools were never updated to support updates to the file format, or the file formats are now rarely used. In all cases these tools increased the libtiff security and maintenance exposure beyond the value offered by the tool. Software configuration changes ------------------------------ * None Library changes --------------- * :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, do not dereference :c:macro:`NULL` pointer when values of tags with :c:macro:`TIFF_SETGET_C16_ASCII` / :c:macro:`TIFF_SETGET_C32_ASCII` access are 0-byte arrays. Fixes :bugzilla:`2593` (regression introduced by previous fix done on 2016-11-11 for :cve:`2016-9297`). Reported by Henri Salo. Assigned as :cve:`2016-9448` * :file:`libtiff/tif_aux.c`: fix crash in :c:func:`TIFFVGetFieldDefaulted` when requesting Predictor tag and that the zip/lzw codec is not configured. Fixes :bugzilla:`2591` * :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, make sure that values of tags with :c:macro:`TIFF_SETGET_C16_ASCII` / :c:macro:`TIFF_SETGET_C32_ASCII` access are :c:macro:`NULL` terminated, to avoid potential read outside buffer in :c:func:`_TIFFPrintField`. Fixes :bugzilla:`2590` * :file:`libtiff/tif_dirread.c`: reject images with OJPEG compression that have no ``TileOffsets``/``StripOffsets`` tag, when OJPEG compression is disabled. Prevent :c:macro:`NULL` pointer dereference in :c:func:`TIFFReadRawStrip1` and other functions that expect :c:member:`td_stripbytecount` to be non :c:macro:`NULL`. Fixes :bugzilla:`2585` * :file:`libtiff/tif_strip.c`: make :c:func:`TIFFNumberOfStrips` return the ``td->td_nstrips`` value when it is non-zero, instead of recomputing it. This is needed in :c:macro:`TIFF_STRIPCHOP` mode where :c:member:`td_nstrips` is modified. Fixes a read outsize of array in :program:`tiffsplit` (or other utilities using :c:func:`TIFFNumberOfStrips`). Fixes :bugzilla:`2587` (:cve:`2016-9273`) * :file:`libtiff/tif_predict.h`, :file:`libtiff/tif_predict.c`: Replace assertions by runtime checks to avoid assertions in debug mode, or buffer overflows in release mode. Can happen when dealing with unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations * :file:`libtiff/tif_dir.c`: discard values of ``SMinSampleValue`` and ``SMaxSampleValue`` when they have been read and the value of ``SamplesPerPixel`` is changed afterwards (like when reading a OJPEG compressed image with a missing ``SamplesPerPixel`` tag, and whose photometric is ``RGB`` or ``YCbCr``, forcing ``SamplesPerPixel`` being 3). Otherwise when rewriting the directory (for example with tiffset, we will expect 3 values whereas the array had been allocated with just one), thus causing a out of bound read access. Fixes :bugzilla:`2500` (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) * :file:`libtiff/tif_dirwrite.c`: avoid :c:macro:`NULL` pointer dereference on :c:member:`td_stripoffset` when writing directory, if :c:macro:`FIELD_STRIPOFFSETS` was artificially set for a hack case in OJPEG case. Fixes :bugzilla:`2500` (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) * :file:`libtiff/tif_getimage.c` (:c:func:`TIFFRGBAImageOK`): Reject attempts to read floating point images. * :file:`libtiff/tif_predict.c` (:c:func:`PredictorSetup`): Enforce bits-per-sample requirements of floating point predictor (3). Fixes :cve:`2016-3622` "Divide By Zero in the :program:`tiff2rgba` tool." * :file:`libtiff/tif_pixarlog.c`: fix out-of-bounds write vulnerabilities in heap allocated buffers. Reported as MSVR 35094. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`libtiff/tif_write.c`: fix issue in error code path of :c:func:`TIFFFlushData1` that didn't reset the :c:member:`tif_rawcc` and :c:member:`tif_rawcp` members. I'm not completely sure if that could happen in practice outside of the odd behaviour of :c:func:`t2p_seekproc` of tiff2pdf). The report points that a better fix could be to check the return value of :c:func:`TIFFFlushData1` in places where it isn't done currently, but it seems this patch is enough. Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations team. * :file:`libtiff/tif_pixarlog.c`: Fix write buffer overflow in :c:func:`PixarLogEncode` if more input samples are provided than expected by :c:func:`PixarLogSetupEncode`. Idea based on :file:`libtiff-CVE-2016-3990.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro, but with different and simpler check. (:bugzilla:`2544`) * :file:`libtiff/tif_read.c`: Fix out-of-bounds read on memory-mapped files in :c:func:`TIFFReadRawStrip1` and :c:func:`TIFFReadRawTile1` when ``stripoffset`` is beyond :c:type:`tmsize_t` max value (reported by Mathias Svensson) * :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadEncodedStrip` and :c:func:`TIFFReadEncodedTile` directly use user provided buffer when no compression (and other conditions) to save a :c:func:`memcpy` * :file:`libtiff/tif_write.c`: make :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteEncodedTile` directly use user provided buffer when no compression to save a :c:func:`memcpy`. * :file:`libtiff/tif_luv.c`: validate that for :c:macro:`COMPRESSION_SGILOG` and :c:macro:`PHOTOMETRIC_LOGL`, there is only one sample per pixel. Avoid potential invalid memory write on corrupted/unexpected images when using the :c:func:`TIFFRGBAImageBegin` interface (reported by Clay Wood) * :file:`libtiff/tif_pixarlog.c`: fix potential buffer write overrun in :c:func:`PixarLogDecode` on corrupted/unexpected images (reported by Mathias Svensson) (:cve:`2016-5875`) * libtiff/libtiff.def: Added ``_TIFFMultiply32`` and ``_TIFFMultiply64`` to libtiff.def * :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Add a '1' to the :c:macro:`HAVE_SNPRINTF` definition. * :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Applied patch by Edward Lam to define :c:macro:`HAVE_SNPRINTF` for Visual Studio 2015. * :file:`libtiff/tif_dirread.c`: when compiled with :c:macro:`DEFER_STRILE_LOAD`, fix regression, introduced on 2014-12-23, when reading a one-strip file without a ``StripByteCounts`` tag. GDAL #6490 * :file:`libtiff/*`: upstream typo fixes (mostly contributed by Kurt Schwehr) coming from GDAL internal libtiff * :file:`libtiff/tif_fax3.h`: make :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` structure a :c:type:`uint16` to reduce size of the binary. * :file:`libtiff/tif_read.c`, :file:`tif_dirread.c`: fix indentation issues raised by GCC 6 ``-Wmisleading-indentation`` * :file:`libtiff/tif_pixarlog.c`: avoid zlib error messages to pass a :c:macro:`NULL` string to ``%s`` formatter, which is undefined behaviour in :c:func:`sprintf`. * :file:`libtiff/tif_next.c`: fix potential out-of-bound write in :c:func:`NeXTDecode` triggered by ``_ (:bugzilla:`2508`) * :file:`libtiff/tif_luv.c`: fix potential out-of-bound writes in decode functions in non debug builds by replacing :c:func:`assert` by regular ``if`` checks (:bugzilla:`2522`). Fix potential out-of-bound reads in case of short input data. * :file:`libtiff/tif_getimage.c`: fix out-of-bound reads in :c:type:`TIFFRGBAImage` interface in case of unsupported values of ``SamplesPerPixel``/``ExtraSamples`` for LogLUV / CIELab. Add explicit call to :c:func:`TIFFRGBAImageOK` in :c:func:`TIFFRGBAImageBegin`. Fix :cve:`2015-8665` reported by limingxing and :cve:`2015-8683` reported by zzf of Alibaba. * :file:`libtiff/tif_dirread.c`: workaround false positive warning of Clang Static Analyzer about :c:macro:`NULL` pointer dereference in :c:func:`TIFFCheckDirOffset`. * :file:`libtiff/tif_fax3.c`: remove dead assignment in :c:func:`Fax3PutEOLgdal`. Found by Clang Static Analyzer * :file:`libtiff/tif_dirwrite.c`: fix truncation to 32 bit of file offsets in :c:func:`TIFFLinkDirectory` and :c:func:`TIFFWriteDirectorySec` when aligning directory offsets on a even offset (affects BigTIFF). This was a regression of the changeset of 2015-10-19. * :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteEncodedTile` should return -1 in case of failure of :c:func:`tif_encodestrip` as documented * :file:`libtiff/tif_dumpmode.c`: :c:func:`DumpModeEncode` should return 0 in case of failure so that the above mentioned functions detect the error. * :file:`libtiff/*.c`: fix MSVC warnings related to cast shortening and assignment within conditional expression * :file:`libtiff/*.c`: fix clang -Wshorten-64-to-32 warnings * :file:`libtiff/tif_dirread.c`: prevent reading ColorMap or TransferFunction if ``BitsPerPixel`` > 24, so as to avoid huge memory allocation and file read attempts * :file:`libtiff/tif_dirread.c`: remove duplicated assignment (reported by Clang static analyzer) * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_compress.c`, :file:`libtiff/tif_jpeg_12.c`: suppress warnings about 'no previous declaration/prototype' * :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirwrite.c`: suffix constants by U to fix 'warning: negative integer implicitly converted to unsigned type' warning (part of ``-Wconversion``) * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_print.c`: fix ``-Wshadow`` warnings (only in :file:`libtiff/`) Tools changes ------------- * tools/Makefile.am: The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, :program:`ras2tiff`, :program:`sgi2tiff`, :program:`sgisv`, and :program:`ycbcr` are completely removed from the distribution. The libtiff tools :program:`rgb2ycbcr` and :program:`thumbnail` are only built in the build tree for testing. Old files are put in new :file:`archive` subdirectory of the source repository, but not in distribution archives. These changes are made in order to lessen the maintenance burden. * :file:`tools/tiff2pdf.c`: avoid undefined behaviour related to overlapping of source and destination buffer in :c:func:`memcpy` call in :c:func:`t2p_sample_rgbaa_to_rgb` Fixes :bugzilla:`2577` * :file:`tools/tiff2pdf.c`: fix potential integer overflows on 32 bit builds in :c:func:`t2p_read_tiff_size` Fixes :bugzilla:`2576` * :file:`tools/fax2tiff.c`: fix segfault when specifying ``-r`` without argument. Patch by Yuriy M. Kaminskiy. Fixes :bugzilla:`2572` * :file:`tools/tiffinfo.c`: fix out-of-bound read on some tiled images. (:bugzilla:`2517`) * :file:`tools/tiffcrop.c`: fix multiple uint32 overflows in :c:func:`writeBufferToSeparateStrips`, :c:func:`writeBufferToContigTiles` and :c:func:`writeBufferToSeparateTiles` that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes :bugzilla:`2592` * :file:`tools/tiffcrop.c`: fix out-of-bound read of up to 3 bytes in :c:func:`readContigTilesIntoBuffer`. Reported as MSVR 35092 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2pdf.c`: fix write buffer overflow of 2 bytes on JPEG compressed images. Reported by Tyler Bohan of Cisco Talos as TALOS-CAN-0187 / :cve:`2016-5652`. Also prevents writing 2 extra uninitialized bytes to the file stream. * :file:`tools/tiffcp.c`: fix out-of-bounds write on tiled images with odd tile width vs image width. Reported as MSVR 35103 by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2pdf.c`: fix read -largely- outsize of buffer in :c:func:`t2p_readwrite_pdf_image_tile`, causing crash, when reading a JPEG compressed image with :c:macro:`TIFFTAG_JPEGTABLES` length being one. Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiffcp.c`: fix read of undefined variable in case of missing required tags. Found on test case of MSVR 35100. * :file:`tools/tiffcrop.c`: fix read of undefined buffer in :c:func:`readContigStripsIntoBuffer` due to uint16 overflow. Probably not a security issue but I can be wrong. Reported as MSVR 35100 by Axel Souchet from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiffcrop.c`: fix various out-of-bounds write vulnerabilities in heap or stack allocated buffers. Reported as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2pdf.c`: fix out-of-bounds write vulnerabilities in heap allocate buffer in :c:func:`t2p_process_jpeg_strip`. Reported as MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2bw.c`: fix weight computation that could result of color value overflow (no security implication). Fix :bugzilla:`2550`. Patch by Frank Freudenberg. * :file:`tools/rgb2ycbcr.c`: validate values of ``-v`` and ``-h`` parameters to avoid potential divide by zero. Fixes :cve:`2016-3623` (:bugzilla:`2569`) * :file:`tools/tiffcrop.c`: Fix out-of-bounds write in :c:func:`loadImage`. From patch :file:`libtiff-CVE-2016-3991.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro (:bugzilla:`2543`) * :file:`tools/tiff2rgba.c`: Fix integer overflow in size of allocated buffer, when ``-b`` mode is enabled, that could result in out-of-bounds write. Based initially on patch :file:`tiff-CVE-2016-3945.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro, with correction for invalid tests that rejected valid files. (:bugzilla:`2545`) * :file:`tools/tiffcrop.c`: Avoid access outside of stack allocated array on a tiled separate TIFF with more than 8 samples per pixel. Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 (:cve:`2016-5321` / :cve:`2016-5323` , :bugzilla:`2558` / :bugzilla:`2559`) * :file:`tools/tiffdump.c`: fix a few misaligned 64-bit reads warned by ``-fsanitize`` * :file:`tools/tiffdump.c` (:c:func:`ReadDirectory`): Remove :c:type:`uint32` cast to :c:func:`_TIFFmalloc` argument which resulted in Coverity report. Added more mutiplication overflow checks. Contributed software changes ---------------------------- None Changes in TIFF v4.0.8 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.8 (:tag:`Release-v4-0-8`) Previous Version :doc:`v4.0.7 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * None Library changes --------------- * :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_open.c`: add parenthesis to fix cppcheck ``clarifyCalculation`` warnings * :file:`libtiff/tif_predict.c`, :file:`libtiff/tif_print.c`: fix printf unsigned vs signed formatting (cppcheck ``invalidPrintfArgType_uint`` warnings) * :file:`libtiff/tif_read.c`, :file:`libtiff/tiffiop.h`: fix :c:type:`uint32` overflow in :c:func:`TIFFReadEncodedStrip` that caused an integer division by zero. Reported by Agostino Sarubbo. Fixes :bugzilla:`2596` * :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_luv.c`: fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ``ColorMap``, ``TransferFunction`` attached and nasty plays with ``bitspersample``. The fix for LUV has not been tested, but suffers from the same kind of issue of PixarLog. Reported by Agostino Sarubbo. Fixes :bugzilla:`2604` * :file:`libtiff/tif_strip.c`: revert the change in :c:func:`TIFFNumberOfStrips` done for :bugzilla:`2587` / :cve:`2016-9273` since the above change is a better fix that makes it unnecessary. * :file:`libtiff/tif_dirread.c`: modify :c:func:`ChopUpSingleUncompressedStrip` to instantiate compute ``nstrips`` as ``TIFFhowmany_32(td->td_imagelength, rowsperstrip)``, instead of a logic based on the total size of data. Which is faulty is the total size of data is not sufficient to fill the whole image, and thus results in reading outside of the ``StripByCounts``/``StripOffsets`` arrays when using :c:func:`TIFFReadScanline`. Reported by Agostino Sarubbo. Fixes :bugzilla:`2608`. * :file:`libtiff/tif_ojpeg.c`: make :c:func:`OJPEGDecode` early exit in case of failure in :c:func:`OJPEGPreDecode`. This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes :bugzilla:`2611` * :file:`libtiff/tif_write.c`: fix misleading indentation as warned by GCC. * :file:`libtiff/tif_fax3.h`: revert change done on 2016-01-09 that made :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` structure a :c:type:`uint16` to reduce size of the binary. It happens that the Hylafax software uses the tables that follow this typedef (:c:var:`TIFFFaxMainTable`, :c:var:`TIFFFaxWhiteTable`, :c:var:`TIFFFaxBlackTable`), although they are not in a public libtiff header. Raised by Lee Howard. Fixes :bugzilla:`2636` * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_getimage.c`: add :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` variants of the functions without ext, with an extra argument to control the ``stop_on_error`` behaviour. * :file:`libtiff/tif_getimage.c`: fix potential memory leaks in error code path of :c:func:`TIFFRGBAImageBegin`. Fixes :bugzilla:`2627` * :file:`libtiff/tif_jpeg.c`: increase libjpeg max memory usable to 10 MB instead of libjpeg 1MB default. This helps when creating files with "big" tile, without using libjpeg temporary files. Related to https://trac.osgeo.org/gdal/ticket/6757 * :file:`libtiff/tif_jpeg.c`: avoid integer division by zero in :c:func:`JPEGSetupEncode` when horizontal or vertical sampling is set to 0. Fixes :bugzilla:`2653` * :file:`libtiff/tif_dirwrite.c`: in :c:func:`TIFFWriteDirectoryTagCheckedRational`, replace assertion by runtime check to error out if passed value is strictly negative. Fixes :bugzilla:`2535` * :file:`libtiff/tif_dirread.c`: avoid division by floating point 0 in :c:func:`TIFFReadDirEntryCheckedRational` and :c:func:`TIFFReadDirEntryCheckedSrational`, and return 0 in that case (instead of infinity as before presumably) Apparently some sanitizers do not like those divisions by zero. Fixes :bugzilla:`2644` * :file:`libtiff/tif_dir.c`, :file:`tif_dirread.c`, :file:`tif_dirwrite.c`: implement various clampings of double to other data types to avoid undefined behaviour if the output range isn't big enough to hold the input value. Fixes :bugzilla:`2643`, :bugzilla:`2642`, :bugzilla:`2646`, :bugzilla:`2647` * :file:`libtiff/tif_jpeg.c`: validate ``BitsPerSample`` in :c:func:`JPEGSetupEncode` to avoid undefined behaviour caused by invalid shift exponent. Fixes :bugzilla:`2648` * :file:`libtiff/tif_read.c`: avoid potential undefined behaviour on signed integer addition in :c:func:`TIFFReadRawStrip1` in :c:func:`isMapped` case. Fixes :bugzilla:`2650` * :file:`libtiff/tif_getimage.c`: add explicit :c:func:`uint32` cast in :c:var:`putagreytile` to avoid ``UndefinedBehaviorSanitizer`` warning. Patch by Nicolás Peña. Fixes :bugzilla:`2658` * :file:`libtiff/tif_read.c`: :c:func:`TIFFReadBufferSetup`: use :c:func:`_TIFFcalloc` to zero initialize :c:member:`tif_rawdata`. Fixes :bugzilla:`2651` * :file:`libtiff/tiffio.h`, :file:`tif_unix.c`, :file:`tif_win32.c`, :file:`tif_vms.c`: add :c:func:`_TIFFcalloc` * :file:`libtiff/tif_luv.c`, :file:`tif_lzw.c`, :file:`tif_packbits.c`: return 0 in Encode functions instead of -1 when :c:func:`TIFFFlushData1` fails. Fixes :bugzilla:`2130` * :file:`libtiff/tif_ojpeg.c`: fix leak in :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and :c:func:`OJPEGReadHeaderInfoSecTablesAcTable` when read fails. Patch by Nicolás Peña. Fixes :bugzilla:`2659` * :file:`libtiff/tif_jpeg.c`: only run :c:func:`JPEGFixupTagsSubsampling` if the ``YCbCrSubsampling`` tag is not explicitly present. This helps a bit to reduce the I/O amount when the tag is present (especially on cloud hosted files). * :file:`libtiff/tif_lzw.c`: in :c:func:`LZWPostEncode`, increase, if necessary, the code bit-width after flushing the remaining code and before emitting the EOI code. Fixes :bugzilla:`1982` * :file:`libtiff/tif_pixarlog.c`: fix memory leak in error code path of :c:func:`PixarLogSetupDecode`. Patch by Nicolás Peña. Fixes :bugzilla:`2665` * :file:`libtiff/tif_fax3.c`, :file:`tif_predict.c`, :file:`tif_getimage.c`: fix GCC 7 ``-Wimplicit-fallthrough`` warnings. * :file:`libtiff/tif_dirread.c`: fix memory leak in non :c:macro:`DEFER_STRILE_LOAD` mode (ie default) when there is both a ``StripOffsets`` and ``TileOffsets`` tag, or a ``StripByteCounts`` and ``TileByteCounts``. Fixes :bugzilla:`2689` * :file:`libtiff/tif_ojpeg.c`: fix potential memory leak in :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and :c:func:`OJPEGReadHeaderInfoSecTablesAcTable`. Patch by Nicolás Peña. Fixes :bugzilla:`2670` * :file:`libtiff/tif_fax3.c`: avoid crash in :c:func:`Fax3Close` on empty file. Patch by Alan Coopersmith + complement by myself. Fixes :bugzilla:`2673` * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip`: add limitation to the number of bytes read in case ``td_stripbytecount[strip]`` is bigger than reasonable, so as to avoid excessive memory allocation. * :file:`libtiff/tif_zip.c`, :file:`tif_pixarlog.c`, :file:`tif_predict.c`: fix memory leak when the underlying codec (ZIP, PixarLog) succeeds its :c:func:`setupdecode` method, but :c:func:`PredictorSetup` fails. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` and :c:func:`TIFFFillTile`: avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds and non-mapped cases. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial` / :c:func:`TIFFSeek`, avoid potential integer overflows with read_ahead in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. Should especially occur on 32 bit platforms. * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial`: avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_read.c`: update :c:member:`tif_rawcc` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with :c:member:`tif_rawdataloaded` when calling :c:func:`TIFFStartStrip` or :c:func:`TIFFFillStripPartial`. This avoids reading beyond :c:func:`tif_rawdata` when ``bytecount > tif_rawdatasize``. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. Credit to OSS-Fuzz * :file:`libtiff/tif_color.c`: avoid potential :c:type:`int32` overflow in :c:func:`TIFFYCbCrToRGBInit`. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 Credit to OSS-Fuzz * :file:`libtiff/tif_pixarlog.c`, :file:`tif_luv.c`: avoid potential :c:type:`int32` overflows in :c:func:`multiply_ms` and :c:func:`add_ms`. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 Credit to OSS-Fuzz * :file:`libtiff/tif_packbits.c`: fix out-of-buffer read in :c:func:`PackBitsDecode`. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 Credit to OSS-Fuzz * :file:`libtiff/tif_luv.c`: :c:func:`LogL16InitState`: avoid excessive memory allocation when ``RowsPerStrip`` tag is missing. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_lzw.c`: update dec_bitsleft at beginning of LZWDecode(), and update tif_rawcc at end of LZWDecode(). This is needed to properly work with the latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. * :file:`libtiff/tif_pixarlog.c`: :c:func:`PixarLogDecode`: resync :c:member:`tif_rawcp` with :c:member:`next_in` and :c:member:`tif_rawcc` with :c:member:`avail_in` at beginning and end of function, similarly to what is done in :c:func:`LZWDecode`. Likely needed so that it works properly with latest chnges in :file:`tif_read.c` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. But untested... * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: add basic validation of :c:var:`luma` and :c:var:`refBlackWhite` coefficients (just check they are not NaN for now), to avoid potential :c:expr:`float` to :c:expr:`int` overflows. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter validation for :c:var:`refBlackWhite` coefficients values. To avoid invalid :c:expr:`float` to :c:expr:`int32` conversion. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 Credit to OSS Fuzz Tools changes ------------- * :file:`tools/fax2tiff.c` (:c:func:`main`): Applied patch by Jörg Ahrens to fix passing client data for Win32 builds using :file:`tif_win32.c` (:c:macro:`USE_WIN32_FILEIO` defined) for file I/O. Patch was provided via email on November 20, 2016. * :file:`tools/tiffcp.c`: avoid :c:type:`uint32` underflow in :c:func:`cpDecodedStrips` that can cause various issues, such as buffer overflows in the library. Reported by Agostino Sarubbo. Fixes :bugzilla:`2598` * :file:`tools/tiffcrop.c`: fix :c:func:`readContigStripsIntoBuffer` in ``-i`` (ignore) mode so that the output buffer is correctly incremented to avoid write outside bounds. Reported by Agostino Sarubbo. Fixes :bugzilla:`2620` * :file:`tools/tiffcrop.c`: add 3 extra bytes at end of strip buffer in :c:func:`readSeparateStripsIntoBuffer` to avoid read outside of heap allocated buffer. Reported by Agostino Sarubbo. Fixes :bugzilla:`2621` * :file:`tools/tiffcrop.c`: fix integer division by zero when ``BitsPerSample`` is missing. Reported by Agostino Sarubbo. Fixes :bugzilla:`2619` * :file:`tools/tiffinfo.c`: fix null pointer dereference in ``-r`` mode when the image has no ``StripByteCount`` tag. Reported by Agostino Sarubbo. Fixes :bugzilla:`2594` * :file:`tools/tiffcp.c`: avoid potential division by zero if ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. Fixes :bugzilla:`2597` * :file:`tools/tif_dir.c`: when ``TIFFGetField(, TIFFTAG_NUMBEROFINKS, )`` is called, limit the return number of inks to ``SamplesPerPixel``, so that code that parses ink names doesn't go past the end of the buffer. Reported by Agostino Sarubbo. Fixes :bugzilla:`2599` * :file:`tools/tiffcp.c`: avoid potential division by zero if ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. Fixes :bugzilla:`2607` * :file:`tools/tiffcp.c`: fix :c:type:`uint32` underflow/overflow that can cause heap-based buffer overflow. Reported by Agostino Sarubbo. Fixes :bugzilla:`2610` * :file:`tools/tiffcp.c`: replace ``assert( (bps % 8) == 0 )`` by a non assert check. Reported by Agostino Sarubbo. Fixes :bugzilla:`2605` * :file:`tools/tiff2ps.c`: fix 2 heap-based buffer overflows (in :c:func:`PSDataBW` and :c:func:`PSDataColorContig`). Reported by Agostino Sarubbo. Fixes :bugzilla:`2633` and :bugzilla:`2634`. * :file:`tools/tiff2pdf.c`: prevent heap-based buffer overflow in ``-j`` mode on a paletted image. Note: this fix errors out before the overflow happens. There could probably be a better fix. Fixes :bugzilla:`2635` * :file:`tools/tiff2pdf.c`: fix wrong usage of :c:func:`memcpy` that can trigger unspecified behaviour. Fixes :bugzilla:`2638` * :file:`tools/tiff2pdf.c`: avoid potential invalid memory read in :c:func:`t2p_writeproc`. Fixes :bugzilla:`2639` * :file:`tools/tiff2pdf.c`: avoid potential heap-based overflow in :c:func:`t2p_readwrite_pdf_image_tile`. Fixes :bugzilla:`2640` * :file:`tools/tiffcrop.c`: remove extraneous :c:func:`TIFFClose` in error code path, that caused double free. Related to :bugzilla:`2535` * :file:`tools/tiffcp.c`: error out cleanly in :c:func:`cpContig2SeparateByRow` and :c:func:`cpSeparate2ContigByRow` if ``BitsPerSample != 8`` to avoid heap based overflow. Fixes :bugzilla:`2656` and :bugzilla:`2657` * :file:`tools/raw2tiff.c`: avoid integer division by zero. Fixes :bugzilla:`2631` * :file:`tools/tiff2ps.c`: call :c:func:`TIFFClose` in error code paths. * :file:`tools/fax2tiff.c`: emit appropriate message if the input file is empty. Patch by Alan Coopersmith. Fixes :bugzilla:`2672` * :file:`tools/tiff2bw.c`: close :c:struct:`TIFF` handle in error code path. Fixes :bugzilla:`2677` Contributed software changes ---------------------------- None Changes in TIFF v4.0.9 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.9 (:tag:`Release-v4-0-9`) Previous Version :doc:`v4.0.8 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * :file:`test/Makefile.am`: Add some tests for tiff2bw. * :file:`.appveyor.yml`, :file:`.travis.yml`, :file:`build/travis-ci`: apply patches :file:`0001-ci-Travis-script-improvements.patch` and :file:`0002-ci-Invoke-helper-script-via-shell.patch` by Roger Leigh (sent to mailing list) * :file:`.travis.yml`, :file:`build/travis-ci`: new files from :file:`0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch` by Roger Leigh (sent to mailing list on 2017-06-08). This patch adds support for the Travis-CI service. * :file:`.appveyor.yml`: new file from :file:`0002-ci-Add-AppVeyor-support.patch` by Roger Leigh (sent to mailing list on 2017-06-08). This patch adds a :file:`.appveyor.yml` file to the top-level. This allows one to opt in to having a branch built on Windows with Cygwin, MinGW and MSVC automatically when a branch is pushed to GitHub, GitLab, BitBucket or any other supported git hosting service. * :file:`CMakeLists.txt`, :file:`test/CMakeLists.txt`, :file:`test/TiffTestCommon.cmake`: apply patch :file:`0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch` from Roger Leigh (sent to mailing list on 2017-06-08). This patch makes the CMake build system support running the tests with MinGW or Cygwin. * :file:`test/tiffcp-lzw-compat.sh`, :file:`test/images/quad-lzw-compat.tiff`: new files to test old-style LZW decompression * :file:`test/common.sh`, :file:`Makefile.am`, :file:`CMakeList.txt`: updated with above * :file:`test/Makefile.am`: add missing reference to images/quad-lzw-compat.tiff to fix ``make distcheck``. Patch by Roger Leigh * :file:`nmake.opt`: support a ``DEBUG=1`` option, so as to adjust ``OPTFLAGS`` and use ``/MDd`` runtime in debug mode. Library changes --------------- * :file:`libtiff/tif_color.c`: :c:func:`TIFFYCbCrToRGBInit`: stricter clamping to avoid :c:type:`int32` overflow in :c:func:`TIFFYCbCrtoRGB`. Fixes :oss-fuzz:`1844`. Credit to OSS Fuzz * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter validation for ``refBlackWhite`` coefficients values. To avoid invalid ``float->int32`` conversion (when ``refBlackWhite[0] == 2147483648.f``) Fixes :oss-fuzz:`1907`. Credit to OSS Fuzz * :file:`libtiff/tif_dirinfo.c`, :file:`tif_dirread.c`: add :c:func:`_TIFFCheckFieldIsValidForCodec`, and use it in :c:func:`TIFFReadDirectory` so as to ignore fields whose tag is a codec-specified tag but this codec is not enabled. This avoids :c:func:`TIFFGetField` to behave differently depending on whether the codec is enabled or not, and thus can avoid stack based buffer overflows in a number of TIFF utilities such as :program:`tiffsplit`, :program:`tiffcmp`, :program:`thumbnail`, etc. Patch derived from :file:`0063-Handle-properly-CODEC-specific-tags.patch` (:bugzilla:`2580`) by Raphaël Hertzog. Fixes: :bugzilla:`2580`, :bugzilla:`2693`, :bugzilla:`2625` (:cve:`2016-10095`), :bugzilla:`2564` (:cve:`2015-7554`), :bugzilla:`2561` (:cve:`2016-5318`), :bugzilla:`2499` (:cve:`2014-8128`), :bugzilla:`2441`, :bugzilla:`2433`. * :file:`libtiff/tif_swab.c`: if :c:macro:`DISABLE_CHECK_TIFFSWABMACROS` is defined, do not do the ``#ifdef TIFFSwabXXX`` checks. Make it easier for GDAL to rename the symbols of its internal libtiff copy. * :file:`libtiff/tif_dirread.c`: fix regression of libtiff 4.0.8 in :c:func:`ChopUpSingleUncompressedStrip` regarding update of newly single-strip uncompressed files whose bytecount is 0. Before the change of 2016-12-03, the condition ``bytecount==0`` used to trigger an early exit/disabling of strip chop. Re-introduce that in update mode. Otherwise this cause later incorrect setting for the value of ``StripByteCounts``/``StripOffsets``. (:gdal-trac:`6924`). * :file:`libtiff/tif_dirread.c`: :c:func:`TIFFFetchStripThing`: limit the number of items read in ``StripOffsets``/``StripByteCounts`` tags to the number of strips to avoid excessive memory allocation. Fixes :oss-fuzz:`2215`. Credit to OSS Fuzz * :file:`libtiff/tif_getimage.c`: avoid many (harmless) :c:expr:`unsigned int` overflows. * :file:`libtiff/tif_fax3.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`Fax3Encode2DRow`. Could potentially be a bug with huge rows. * :file:`libtiff/tif_jpeg.c`: avoid (harmless) :c:expr:`unsigned int` overflow on tiled images. * :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` and ``BYTECOUNTLOOKSBAD`` when file is too short. * :file:`libtiff/tif_predict.c`: decorate legitimate functions where :c:expr:`unsigned int` overflow occur with :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` * :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` * :file:`libtiff/tiffiop.h`: add :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` macro to disable CLang warnings raised by ``-fsanitize=undefined,unsigned-integer-overflow`` * :file:`libtiff/tif_jpeg.c`: add anti-denial of service measure to avoid excessive CPU consumption on progressive JPEGs with a huge number of scans. See ``_. .. note:: Only affects libtiff since 2014-12-29 where support of non-baseline JPEG was added. * :file:`libtiff/tif_jpeg.c`: error out at decoding time if anticipated libjpeg memory allocation is above 100 MB. libjpeg in case of multiple scans, which is allowed even in baseline JPEG, if components are spread over several scans and not interleavedin a single one, needs to allocate memory (or backing store) for the whole strip/tile. See ``_. This limitation may be overridden by setting the ``LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC`` environment variable, or recompiling libtiff with a custom value of :c:macro:`TIFF_LIBJPEG_LARGEST_MEM_ALLOC` macro. * :file:`libtiff/tif_jbig.c`: fix memory leak in error code path of :c:func:`JBIGDecode`. Fixes :bugzilla:`2706`. Reported by team OWL337 * :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFReadDirEntryFloat`, check that a double value can fit in a float before casting. Patch by Nicolas RUFF * :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_jpeg_12.c`, :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadScanline` works in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with JPEG stream with multiple scans. Also make configurable through a ``LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER`` environment variable the maximum number of scans allowed. Defaults to 100. * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillTile`: add limitation to the number of bytes read in case td_stripbytecount[strip] is bigger than reasonable, so as to avoid excessive memory allocation (similarly to what was done for :c:func:`TIFFFileStrip` on 2017-05-10) * :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadEncodedStripAndAllocBuffer`. Fixes :bugzilla:`2708` and :oss-fuzz:`2433`. Credit to OSS Fuzz * :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedStripAndAllocBuffer` function, variant of :c:func:`TIFFReadEncodedStrip` that allocates the decoded buffer only after a first successful :c:func:`TIFFFillStrip`. This avoids excessive memory allocation on corrupted files. * :file:`libtiff/tif_dirwrite.c`: in :c:func:`TIFFWriteDirectoryTagCheckedXXXX` functions associated with LONG8/SLONG8 data type, replace assertion that the file is BigTIFF, by a non-fatal error. Fixes :bugzilla:`2712` Reported by team OWL337 * :file:`libtiff/tif_read.c`: :c:func:`TIFFStartTile`: set tif_rawcc to tif_rawdataloaded when it is set. Similarly to :c:func:`TIFFStartStrip`. This issue was revealed by the change of 2017-06-30 in :c:func:`TIFFFileTile`, limiting the number of bytes read. But it could probably have been hit too in CHUNKY_STRIP_READ_SUPPORT mode previously ? Fixes :oss-fuzz:`2454` Credit to OSS Fuzz * :file:`libtiff/tif_error.c, tif_warning.c`: correctly use va_list when both an old-style and new-style warning/error handlers are installed. Patch by Paavo Helde (sent on the mailing list) * :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadTileAndAllocBuffer`. Fixes :oss-fuzz:`2470` Credit to OSS Fuzz. * :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedTileAndAllocBuffer` and :c:func:`_TIFFReadTileAndAllocBuffer` variants of :c:func:`TIFFReadEncodedTile` and :c:func:`TIFFReadTile` that allocates the decoded buffer only after a first successful :c:func:`TIFFFillTile`. This avoids excessive memory allocation on corrupted files. * :file:`libtiff/tif_pixarlog.c`: avoid excessive memory allocation on decoding when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) Fixes :oss-fuzz:`2554` Credit to OSS Fuzz * :file:`libtiff/tif_lzw.c`: fix 4.0.8 regression in the decoding of old-style LZW compressed files. * :file:`libtiff/tif_lzw.c`: fix potential out-of-buffer read on 1-byte LZW strips. Crashing issue only on memory mapped files, where the strip offset is the last byte of the file, and the file size is a multiple of one page size on the CPU architecture (typically 4096). Credit to myself :-) * :file:`libtiff/tif_dir.c`: avoid potential null pointer dereference in :c:func:`_TIFFVGetField` on corrupted TIFFTAG_NUMBEROFINKS tag instance. Fixes :bugzilla:`2713` * :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" mode on ``PlanarConfig=Contig`` input images. Fixes :bugzilla:`2715` Reported by team OWL337 * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. Complementary fix for :bugzilla:`2708` in the :c:func:`isMapped` case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated. * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. Complementary fix for :bugzilla:`2708` in the :c:func:`isMapped` case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated. * :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the arrays that hold StripOffsets/StripByteCounts, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes :oss-fuzz:`2350` Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the arrays that hold ``StripOffsets``/``StripByteCounts``, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes :oss-fuzz:`2350` Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: add protection against excessive memory allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes :bugzilla:`2675` * :file:`libtiff/tif_read.c`: add protection against excessive memory allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes :bugzilla:`2675` * :file:`libtiff/tif_luv.c`: :c:func:`LogLuvInitState`: avoid excessive memory allocation when ``RowsPerStrip`` tag is missing. Fixes :oss-fuzz:`2683` Credit to OSS-Fuzz * :file:`libtiff/tif_getimage.c`: :c:func:`gtTileContig` and :c:func:`gtTileSeparate`: properly break from loops on error when ``stoponerr`` is set, instead of going on iterating on row based loop. * :file:`libtiff/tif_getimage.c`: fix fromskew computation when to-be-skipped pixel number is not a multiple of the horizontal subsampling, and also in some other cases. Impact ``putcontig8bitYCbCr44tile``, ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile``, ``putcontig8bitYCbCr21tile`` and ``putcontig8bitYCbCr12tile``. Fixes :bugzilla:`2637` (discovered by Agostino Sarubbo) and :oss-fuzz:`2691` (credit to OSS Fuzz) * :file:`libtiff/tif_luv.c`: further reduce memory requirements for temporary buffer when ``RowsPerStrip >= image_length`` in :c:func:`LogLuvInitState` and :c:func:`LogL16InitState`. Fixes :oss-fuzz:`2700` Credit to OSS Fuzz * :file:`libtiff/tif_dirwrite.c`: replace assertion related to not finding the ``SubIFD`` tag by runtime check (in :c:func:`TIFFWriteDirectorySec`) Fixes :bugzilla:`2727` Reported by team OWL337 * :file:`libtiff/tif_dirwrite.c`: replace assertion to tag value not fitting on :c:type:`uint32` when selecting the value of ``SubIFD`` tag by runtime check (in :c:func:`TIFFWriteDirectoryTagSubifd`). Fixes :bugzilla:`2728` Reported by team OWL337 * :file:`libtiff/tif_jpeg.c`: accept reading the last strip of a JPEG compressed file if the codestream height is larger than the truncated height of the strip. Emit a warning in this situation since this is non compliant. * :file:`libtiff/tiffiop.h`, :c:type:`tif_aux.c`: redirect :c:func:`SeekOK` macro to a :c:func:`_TIFFSeekoK` function that checks if the offset is not bigger than :c:macro:`INT64_MAX`, so as to avoid a ``-1`` error return code of :c:func:`TIFFSeekFile` to match a required seek to :c:macro:`UINT64_MAX`/``-1``. Fixes :bugzilla:`2726` Adapted from proposal by Nicolas Ruff. * :file:`libtiff/tif_dirread.c`: add :c:macro:`NULL` check to avoid likely false positive null-pointer dereference warning by CLang Static Analyzer. * :file:`libtiff/libtiff.def`: add :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` Fixes :bugzilla:`2735` * :file:`libtiff/tif_jpeg.c`: add compatibility with libjpeg-turbo 1.5.2 that honours ``max_memory_to_use > 0``. Cf ``_. * :file:`libtiff/tif_getimage.c`: avoid floating point division by zero in :c:func:`initCIELabConversion` Fixes :oss-fuzz:`3733` Credit to OSS Fuzz Tools changes ------------- * :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" mode on ``PlanarConfig=Contig`` input images. Fixes :bugzilla:`2715` Reported by team OWL337 * :file:`tools/tiffset.c`: fix setting a single value for the ``ExtraSamples`` tag (and other tags with variable number of values). So ``tiffset -s ExtraSamples 1 X``. This only worked when setting 2 or more values, but not just one. * :file:`tools/fax2tiff.c` (``_FAX_Client_Data``): Pass ``FAX_Client_Data`` as the client data. This client data is not used at all at the moment, but it makes the most sense. Issue that the value of ``client_data.fd`` was passed where a pointer is expected was reported via email by Gerald Schade on Sun, 29 Oct 2017. * :file:`tools/tiff2pdf.c` (``t2p_sample_realize_palette``): Fix possible arithmetic overflow in bounds checking code and eliminate comparison between signed and unsigned type. * :file:`tools/tiff2bw.c` (:c:func:`main`): Free memory allocated in the :program:`tiff2bw` program. This is in response to the report associated with :cve:`2017-16232` but does not solve the extremely high memory usage with the associated POC file. Contributed software changes ---------------------------- None Changes in TIFF v4.1.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.1.0 (:tag:`v4.1.0`) Previous Version :doc:`v4.0.10 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here. A change summary is also provided by the :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * 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) :c:func:`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 :c:func:`TIFFOpen` (which implies ``D``). The public :c:func:`TIFFGetStrileOffset`, :c:func:`TIFFGetStrileOffsetWithErr`, :c:func:`TIFFGetStrileByteCount` and :c:func:`TIFFGetStrileByteCountWithErr` 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``. Software configuration changes ------------------------------ * The ``WIN32`` build now uses :file:`tif_win32.c` when building with CMake. * Properly set value of :c:macro:`HOST_FILLORDER` to :c:macro:`LSB2MSB` for Windows CMake builds. It was not being properly set! Library changes --------------- * Changes in the libtiff library may be viewed on-line `Libtiff Library Commits `_.. * New function :c:func:`TIFFReadFromUserBuffer` which replaces the use of :c:func:`TIFFReadEncodedStrip`/:c:func:`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 :c:func:`TIFFDeferStrileArrayWriting` and :c:func:`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. Tools changes ------------- * Changes in the libtiff utilities may be viewed on-line at `Libtiff Tools Commits `_. Contributed software changes ---------------------------- * Changes in the libtiff contrib area may be viewed on-line at `Libtiff Contrib Commits `_. Changes in TIFF v4.2.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.2.0 (:tag:`v4.2.0`) Previous Version :doc:`v4.1.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * Optional support for using libdeflate is added. * Many of the tools now support a memory usage limit. Software configuration changes ------------------------------ * The Microsoft Windows 'nmake' build is resuscitated and provides a default ``HAVE_STRTOLL`` setting in 'nmake.opt' which is suitable for MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in order to compile with earlier compiler versions. * mingw-w64 cmake build fixes to not add libm Library changes --------------- * A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. * EXIF 2.32 and GPS tags and functionality have been upgraded: * Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2 * EXIF-GPS structure, tags and access functions are added as special ``CustomDirectory`` (like it was done for EXIF). * Reading error for FileSource and SceneType tags corrected. * Make ``TIFFTAG_CFAPATTERN`` variable count. * Cmake configuration fixes for big-endian targets. * Added support for optional building against libdeflate for faster Zip/Deflate compression/decompression. We now have 2 kinds of builds with the Zip/Deflate codec: * zlib only * zlib + libdeflate Speed improvements in the 35%-50% range can be expected when libdeflate is used. Compression level up to 12 is now supported (capped to 9 when zlib is used). Still requires zlib for situations where libdeflate cannot be used (that is for scanline access, since libdeflate has no streaming mode) Pseudo-tag ``TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE`` is added to control which subcodec (zlib or libdeflate) should be used (it defaults of course to libdeflate, when it is available). This is mostly aimed at being used on the writing side, to be able to reproduce output of previous libtiff versions at a binary level, in situations where this would be really needed. Or as a safety belt in case there would be unforeseen issues with using libdeflate. It can be used to know when libdeflate is available at runtime (``DEFLATE_SUBCODEC_LIBDEFLATE`` will be the default value in that situation). Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa. Tools changes ------------- * A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. * :program:`ppm2tiff`: support any bps value from 1 to 16. * :program:`tiff2ps`, :program:`tiff2rgba`: A default memory limit is now enforced (256MiB) and a ``-M`` option is added to allow the user to adjust the limit. * :program:`tiff2pdf`, :program:`tiffcp`: A default memory limit is now enforced (256MiB) and a ``-m`` option is added to allow the user to adjust the limit. * :program:`tiffcrop`: A default memory limit is now enforced (256MiB) and a ``-k`` option is added to allow the user to adjust the limit. * :program:`tiff2pdf`: fix "raw" copy of Deflate streams. * :program:`tiff2pdf.c`: properly calculate datasize when saving to JPEG YCbCr * :program:`tiffcp`: disable strip chopping when trying to convert to JBIG compression Contributed software changes ---------------------------- None Changes in TIFF v4.3.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.3.0 (:tag:`v4.3.0`) Previous Version :doc:`v4.2.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * Build and usage of the library and its utilities requires a C99 capable compiler. * New optional codec for the LERC (Limited Error Raster Compression) compression scheme. To have it available, configure libtiff against the SDK available at ``_ * CMake build: revamp of build scripts Software configuration changes ------------------------------ * cmake: revamp of the cmake build scripts. There are impacts on the case of some options. * cmake: update minimum version and policy version to 3.9. * Remove NMake build support. The functionality provided by the NMake build is now completely superseded by the CMake build. * Remove antiquated Scons and makefile.lcc build support. * Remove non-functional VMS and WinCE support. * :file:`autogen.sh` now updates :file:`config.guess` and :file:`config.sub` from master gnulib version. Library changes --------------- * Use of :c:type:`int8`, :c:type:`uint8`, :c:type:`int16`, :c:type:`uint16`, :c:type:`int32`, :c:type:`uint32`, :c:type:`int64`, :c:type:`uint64` typedefs is now deprecated. libtiff code and headers no longer use them, and use their C99 standard equivalents (with ``_t`` suffix). Those typedefs are still available, with deprecation warnings, but external code is strongly encouraged to use the corresponding C99 :file:`stdint.h` types. The deprecated types might be removed in a future release. * Removal of unused, or now useless due to C99 availability, functions in :file:`port/` * A few issues spotted by static code analysis tools fixed. Compiler warnings addressed. Tools changes ------------- * In usage text, insert a line of text summarizing each tool's purpose * tiff tools: made display of compression methods and their parameters conditional on their actual availability * :program:`tiff2ps`: exit the loop in case of error (#232) * :program:`tiff2pdf`: check that tiff_datasize fits in a signed :c:type:`tsize_t` (#202) * :program:`tiffsplit`: exit with :c:macro:`EXIT_FAILURE` if there are extra args on the command line * :program:`tiffcmp`: fix comparaison with pixels that are fractional number of bytes (#53) Contributed software changes ---------------------------- * :file:`iptcutil.c` - set ``#ifdef _WIN32`` (was ``#ifdef WIN32``, which failed at build time) Changes in TIFF v4.4.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.4.0 (:tag:`v4.4.0`) Previous Version :doc:`v4.3.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- None Software configuration changes ------------------------------ * Handle absolute paths in pkg-config file (:issue:`333`) * Correct fix for the pkgconf file relative paths. * cmake: allow running the tests with a read-only source directory. * cmake: Fix ``STRIPCHOP_DEFAULT`` value in CMake builds. * build: Fix static library imports in mingw related to LERC * Fix version in :file:`libtiff-4.pc.in`, and CMake build: Add requirements to pc file * cmake: Fix build with CMake 3.10. * cmake: Export tiff targets. * Make ``LERC_SUPPORT`` conditional on ``ZLIB_SUPPORT`` Library changes --------------- New/improved functionalities: * :c:func:`TIFFIsBigTiff` function added. * Functions :c:func:`TIFFFieldSetGetSize` and :c:func:`TIFFieldSetGetCountSize` added. * :c:func:`LZWDecode`: major speed improvements (~30% faster) * Predictor 2 (horizontal differenciation): support 64-bit * Support libjpeg 9d Bug fixes: * Remove incorrect assert (:issue:`329`) * avoid hang in :c:func:`TIFFRewriteDirectory` if a classic file > 4 GB is attempted to be created * :file:`tif_jbig.c`: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes :issue:`385`) * :c:func:`TIFFFetchNormalTag`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`383`) * :c:func:`TIFFWriteDirectoryTagData`: turn assertion on data length into a runtime check * :c:func:`TIFFFetchStripThing`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) * :c:func:`TIFFReadDirectory`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) * :c:func:`TIFFYCbCrToRGBInit`: avoid Integer-overflow * ``TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS)``: return error if returned pointer is NULL (fixes :issue:`342`) * OJPEG: avoid assertion when using :c:func:`TIFFReadScanline` (fixes :issue:`337`) * :c:func:`TIFFReadDirectory`: fix OJPEG hack (fixes :issue:`319`) * LZW codec: fix support for strips/tiles > 2 GB on Windows * :c:func:`TIFFAppendToStrip`: fix rewrite-in-place logic (fixes :issue:`309`) * Fix :c:func:`TIFFRewriteDirectory` discarding directories. * :c:func:`TIFFReadCustomDirectory`: avoid crash when reading SubjectDistance tag on a non EXIF directory (:issue:`316`) * Fix Segmentation fault printing GPS directory if ``Altitude`` tag is present * :file:`tif_jpeg.c`: do not emit progressive scans with mozjpeg. (:issue:`266`) * :c:func:`_TIFFRewriteField`: fix when writing a IFD with a single tile that is a sparse one, on big endian hosts * Fix all remaining uses of legacy Deflate compression id and warn on use. Tools changes ------------- Bug fixes: * :program:`tiffcrop`: Fix issue :issue:`330` and some more from 320 to 349. * :program:`tiffcrop`: fix issue :issue:`395`: generation of strange section images. * :program:`tiffcrop`: fix issue :issue:`380` and :issue:`382` heap buffer overflow in extractImageSection * :program:`tiffcrop`: fix FPE (:issue:`393`) * :program:`tiffcrop`: buffsize check formula in :c:func:`loadImage` amended (fixes :issue:`273`, :issue:`275`) * :program:`tiffcrop.c`: Fix issue :issue:`352` heap-buffer-overflow by correcting :c:type:`uint32_t` underflow. * :program:`tiff2pdf`: handle 8-bit palette colormap. * :program:`tiffcp`: avoid buffer overflow in "mode" string (fixes :issue:`400`) * :program:`tiffcp`: Fix incomprehensible setting of orientation tag (fixes :issue:`29`) * :program:`tiffcp`: do not try to fetch compressor-specific tags when not appropriate (fixes :issue:`396`) * :program:`tiffcp`: fix heap buffer overflow (:issue:`278`) * :program:`tiff2ps`: In :c:func:`limitMalloc` check for negative size (fixes :issue:`284`) * :program:`tiffinfo`: add a ``-M`` switch to define the maximum heap allocation, and default it to 256 MiB (fixes :issue:`287`, :issue:`290`) * :program:`tiffinfo`: limit more memory allocations using ``-M`` switch (fixes :issue:`288`) * :program:`tiffset`: fix global-buffer-overflow for ASCII tags where count is required (fixes :issue:`355`) * :program:`raw2tiff`: check that band number if not zero to avoid floating point exception(fixes :issue:`338`) * :program:`tiffinfo`/:program:`tiffdump`: improve output for GDAL tags. Contributed software changes ---------------------------- None Changes in TIFF v4.5.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.5.0 (:tag:`v4.5.0`) Previous Version :doc:`v4.4.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * Whole code base reformatting of .c/.h files using new .clang-format format * Documentation changed from static HTML and man pages to Restructured Text (rst). HTML and man pages are now build artifacts. Software configuration changes ------------------------------ * SONAME version bumped to 6 due to changes in symbol versioning. * autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take into its capability of handling both 8-bit JPEG and 12-bit JPEG in a single build. * autoconf/cmake: detect sphinx-build to build HTML and man pages * CMakeLists.txt: fix warning with -Wdev * CMake: correctly set default value of 'lzma' option when liblzma is detected (:issue:`482`) * CMake: Moved linking of CMath::CMath into CMath_LIBRARY check. * Fix CMake build to be compatible with FetchContent. * cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS (:issue:`443`) * cmake: Fixes for Visual Studio 2022. * Adds Requires.private generation so that pkg-config can correctly find the dependencies of libtiff. * Fix dependency on libm on Android * cmake: libtiffxx is static on win32 * Fix build in tif_lzw.c * CMake: Add options for disabling tools, tests, contrib and docs. Library changes --------------- New/improved functionalities: * Addition of an open option concept with the new functions :c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt`, :c:func:`TIFFClientOpenExt`, :c:func:`TIFFOpenOptionsAlloc`, :c:func:`TIFFOpenOptionsFree` * Leveraging above mentioned open option concept, addition of a new capability to limit the size of a single dynamic memory allocation done by the library with :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` * Leveraging above mentioned open option concept, addition of a new capability to specify per-TIFF handle re-entrant error and warning callbacks with :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and :c:func:`TIFFOpenOptionsSetWarningHandlerExtR` * Related to IFD-Loop detection refactoring, the number of IFDs that libtiff can browse through has been extended from 65535 to 1048576. This value is a build-time setting that can be configured with CMake's TIFF_MAX_DIR_COUNT variable or autoconf's --with-max-dir-count option. API/ABI breaks: * tdir_t type updated to uint32_t. This type is now used for the return value of :c:func:`TIFFCurrentDirectory` and :c:func:`TIFFNumberOfDirectories`, and as the argument of :c:func:`TIFFSetDirectory` and :c:func:`TIFFUnlinkDirectory` Bug fixes: * TIFFWriteRawStrip(): restore capabilities to append data in the current strip (:issue:`489`) * _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on broken files (:issue:`479`) * TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB (oss-fuzz #53137) * Replace sprintf calls with snprintf to fix warnings on macOS 13 SDK * Added warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (:issue:`438`) * tif_dirinfo.c: fix TIFFTAG_CLIPPATH tag declaration (:issue:`439`) * tif_dirinfo.c: fix TIFFTAG_COMPRESSION and _BITSPERSAMPLE tag declaration (:issue:`364`) * Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value (:issue:`149`, :issue:`150`, :issue:`152`, :issue:`168`, :issue:`250`, :issue:`269`,:issue:`398`, CVE-2022-3599, :issue:`456`) * TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case (oss-fuzz #52309) * Improved/fixes IFD-Loop Handling (:issue:`455`). * Update getimage to support large raster images. * Presetting of default tag values extended (e.g. PlanarConfig). (:issue:`449`) * Deal with RichTIFFIPTC tag written with LONG type (:issue:`225`) * TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (:issue:`442`) * tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional compile-time version check * TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could cause issues with reading JPEG compressed files * _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific tag and the codec is not configured (:issue:`433`, :issue:`486`, CVE-2022-34526) * Add basic 16 bit cielab support. * WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding * tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2 Tools changes ------------- New/improved functionality: * :program:`tiffinfo`: Updated to parse through SubIFDs and show their tags. Bug fixes: * :program:`tiffcrop`: add check if (bps != 1) in writeSingleSection() (:issue:`169`) * :program:`tiffcrop`: Fix too many 'mode' options on command line (:issue:`470` and :issue:`450`) * :program:`tiffcrop`: Fix memory allocation to require a larger buffer (:issue:`271`, :issue:`381`, :issue:`386`, :issue:`388`, :issue:`389`, :issue:`435`, CVE-2022-3570, CVE-2022-3598) * :program:`tiffcrop`: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (:issue:`411`, CVE-2022-3627, :issue:`413`, CVE-2022-3597, :issue:`426`, CVE-2022-3626) * :program:`tiffcrop`: -S option mutually exclusive (:issue:`349`, :issue:`414`, :issue:`422`, :issue:`423`, :issue:`424`) * :program:`tiffcrop`: fix floating-point exception (:issue:`415`, :issue:`427`, :issue:`428`, CVE-2022-2056, CVE-2022-2057, CVE-2022-2058) * :program:`tiff2pdf`: Don't try to seek into stdout (:issue:`441`) * :program:`tiffinfo`: update curdir from uint16_t to tdir_t for more than 64k IFD handling. Contributed software changes ---------------------------- None Changes in TIFF v4.5.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.5.1 (:tag:`v4.5.1`) Previous Version :doc:`v4.5.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: .. warning:: 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. .. warning:: 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 https://gitlab.com/libtiff/libtiff/-/merge_requests/496 and https://gitlab.com/libtiff/libtiff/-/merge_requests/494 Major changes ------------- None 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 tif_config.h.cmake.in and tiffconf.h.cmake.in 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:`526`). * CMake: FindLERC.cmake: version string return added. * CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files * CMake: fix export of INTERFACE_INCLUDE_DIRECTORIES Library changes --------------- New/improved functionalities: * Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make 'H' flag of :c:func:`TIFFOpen` to warn and an alias of FILLORDER_MSB2LSB. :file:`tif_lerc.c`: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN. * Optimize relative seeking within :c:func:`TIFFSetDirectory` by using the learned list of IFD offsets. * Improve internal IFD offset and directory number map handling. * Behavior of :c:func:`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:`484`). * tif_ojpeg.c: checking for division by zero (fixes :issue:`554`). * LZWDecode(): avoid crash when trying to read again from a strip whith a missing end-of-information marker (fixes :issue:`548`). * Fixed runtime error: applying zero offset to null pointer in :c:func:`countInkNamesString`. * Fixing crash in :c:func:`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 :c:func:`uv_encode` (:issue:`530`). * :c:func:`TIFFClose` avoid NULL pointer dereferencing (:issue:`515`). * 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:`513`). * :c:func:`TIFFSetDirectory` and :c:func:`TIFFWriteDirectorySec` avoid harmless unsigned-integer-overflow (due to gdal oss-fuzz #54311 and #54343). * :file:`tif_ojpeg.c`: fix :issue:`554` 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:`548`). Documentation ------------- * 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: * :program:`tiffcrop`: Consider error return of writeSelections() (fixes :issue:`553`). * :program:`tiffcrop`: fix memory leak (:issue:`475`). * :program:`tiffcrop`: do not reuse input buffer for subsequent images (:issue:`527`). * :program:`tiffcrop`: Amend rotateImage() not to toggle the input (main) image width and length parameters when only cropped image sections are rotated. Remove buffptr from region structure because never used. Fixes :issue:`492`, :issue:`493`, :issue:`494`, :issue:`495`, :issue:`499`, :issue:`518`, :issue:`519`. * :program:`tiffcrop`: correctly update buffersize after rotateImage() (:issue:`520`). * :program:`tiffcrop`: added check for assumption on composite images. Fixes :issue:`496`, :issue:`497`, :issue:`498`, :issue:`500`, :issue:`501`. * :program:`tiffmedian`: avoid zero num_colors (:issue:`477`). * :program:`fax2ps`: fix buffer overflow in qsort function pcompar (:issue:`475`). * :program:`tiffset`: get filesize to allocate only the required memory (:issue:`241`). * :program:`tiffcrop`: fix :issue:`553` by considering error return of writeSelections(). * tif_ovrcache.c: check :c:func:`TIFFSetSubDirectory` return value (CID 1524573). Contributed software changes ---------------------------- None Changes in TIFF v4.6.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.6.0 (:tag:`v4.6.0`) Previous Version :doc:`v4.5.1 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- .. warning:: This version removes a big number of utilities that have suffered from lack of maintenance over the years and were the source of various reported security issues. See "Removed functionality" below for the list of removed utilities. Starting with libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, tiffdump, tiffcp and tiffset) was discontinued, due to the lack of contributors able to address reported security issues. tiff2ps and tiff2pdf source code has been moved in a unsupported category, no longer built by default, but are still part of the the source distribution. Other retired utilities are in a archive/ directory, only available in the libtiff git repository. Issues related to unsupported and archived tools will no longer be accepted in the libtiff bug tracker. Software configuration changes ------------------------------ * TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and TIFF_LIBRARIES for compatibility with FindTIFF.cmake as shipped by CMake (fixes :issue:`589`) * Update CMake and autoconf scripts to consistently update LibTIFF version defines and references in various files when version definition in configure.ac has been changed. - Move in tiffvers.h from libtiff source directory to libtiff build directory. - Remove unused version information from tif_config.h - With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h are consistently updated from configure.ac. The version release-date is taken from file RELEASE-DATE. - The files VERSION and RELEASE-DATE are only updated with a special CMake target build: cmake --build . --target tiff_release. - For autotools, version information is updated from configure.ac with ./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE. - ./configure generates tiffvers.h with the cached version information and LIBTIFF_RELEASE_DATE. - "make release" updates tiffvers.h and VERSION file with cached version info and RELEASE-DATE file and tiffves.h with the current date. * CMake: fix build with -Dstrip-chopping=off (fixes :issue:`600`) Library changes --------------- New/improved functionalities: * Fix using ``__attribute__`` libtiff with clang-for-windows API/ABI breaks: * None Bug fixes: * WebP decoder: validate WebP blob width, height, band count against TIFF parameters to avoid use of uninitialized variable, or decoding corrupted content without explicit error (fixes :issue:`581`, :issue:`582`). * WebP codec: turn exact mode when creating lossless files to avoid altering R,G,B values in areas where alpha=0 (https://github.com/OSGeo/gdal/issues/8038) * Fix TransferFunction writing of only two transfer functions. * TIFFReadDirectoryCheckOrder: avoid integer overflow. When it occurs, it should be harmless in practice though (https://gitlab.com/libtiff/libtiff/-/merge_requests/512) Documentation ------------- * TiffField functions documentation updated with return behaviour for not defined tags and determination of write-/read-count size. Tools changes ------------- Removed functionality: * The following tools are no longer compiled and have been moved to archive/tools: - fax2ps - fax2tiff - pal2rgb - ppm2tiff - raw2tiff - rgb2ycbcr - thumbnail - tiff2bw - tiff2rgba - tiffcmp - tiffcrop - tiffdither - tiffgt - tiffmedian * The following tools are no longer compiled by default: tiff2ps and tiff2pdf. They have been moved to tools/unsupported. They can be built by setting ``--enable-tools-unsupported`` for autoconf, or ``-Dtiff-tools-unsupported`` for CMake, but as the name imply, they are no longer supported by upstream. Packagers are suggested *not* to enable those options. * tiffcp: remove -i option (ignore errors), because almost all fuzzer issues were consequential errors from ignored errors because of the "-i" option. New/improved functionality: * None Bug fixes: * tiffset: fix #597: warning: comparison of integer expressions of different signedness. (fixes :issue:`597`) * tiffcp: fix memory corruption (overflow) on hostile images (fixes :issue:`591`) Test changes ------------ * Add missing test_write_read_tags.c and test_transferfunction_write_read.c in tarball (fixes :issue:`585`) and correct "long" issue. * Don't use "long" because can be int32_t or int64_t, depending on compiler and system. Changes to contributed and unsupported tools -------------------------------------------- * raw2tiff: fix integer overflow and bypass of the check (fixes :issue:`592`) Changes in TIFF v4.7.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.7.0 (:tag:`v4.7.0`) Previous Version :doc:`v4.6.0 ` Primary Download Site ``_ Home HTTP Site #1 ``_ Home HTTP Site #2 ``_ ====================== ========================================== 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 :file:`ChangeLog` file included in the release package and by the Git commit history. Major changes ------------- This version restores in the default build the availability of the tools that had been dropped in v4.6.0 (cf :ref:`rfc2_restoring_needed_tools`) Software configuration changes ------------------------------ - autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection - autoconf build: fix error when running make clean (fixes :issue:`630`) - autoconf build: back off the minimum required automake version to 1.11 - autoconf.ac: fix detection of windows.h for mingw (fixes :issue:`605`) - libtiff-4.pc: Fix `Requires.private` missing `Lerc`. It provides a `.pc` file starting from version 4 (in autoconf builds, we assume that liblerc is at least version 4) - CMake: Fix TIFF_INCLUDE_DIRS - CMake: MinGW compilers don't need a .def file for shared library - CMake: move libdeflate and Lerc to Requires.private - CMake: enable resource compilation on all Windows. Library changes --------------- New/improved functionalities: - Add ``TIFFOpenOptionsSetMaxCumulatedMemAlloc()``. This function complements ``TIFFOpenOptionsSetMaxSingleMemAlloc()`` to define the maximum cumulated memory allocations in byte, for a given TIFF handle, that libtiff internal memory allocation functions are allowed. API/ABI breaks: * None Bug fixes: - TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged. - TIFFXYZToRGB: avoid integer overflow (fixes :issue:`644`) - uv_decode() and uv_encode(): avoid potential out-of-bounds array index (fixes :issue:`645`) - Fix cases where tif_curdir is set incorrectly. Fix cases where the current directory number (tif_curdir) is set inconsistently or incorrectly, depending on the previous history. - TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) output buffer if failure (fixes :issue:`375`) - OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes :issue:`183`) - ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL - LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values - tif_fax3.c: error out after a number of times end-of-file has been reached (fixes :issue:`583`) - LZW: avoid warning about misaligned address with UBSAN (fixes :issue:`616`) - TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row (fixes :issue:`622`, CVE-2023-52356) - tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - Avoid FPEs (division by zero) in tif_getimage.c. - Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros by checking for denominator not zero before macros are executed. (fixes :issue:`628`) - Add non-zero check before division in TIFFComputeStrip() - Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active - Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` - Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated memory in the tif-structure. - For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is set at the end to avoid deleting the last character. (fixes :issue:`579`) - Check return value of _TIFFCreateAnonField(). (fixes :issue:`624`, CVE-2024-7006) - Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857) - Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes :issue:`618`) - tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes :issue:`608`) Other changes: - Fix warnings with GCC 14 - tif_dir.c: Log source file, line number, and input tif for directory count error (fixes :issue:`627`) - Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() changed to using set_field_type. - tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups - Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble() - Remove support for _MSC_VER < 1500. - Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ Documentation ------------- - Amend manpages for changes in current directory index behaviour - Note on using TIFFFlush() before TIFFClose() to check that the data has been successfully written to the file. (fixes :issue:`506`) - Update TIFF documentation about TIFFOpenOptions.rst and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes (relates to CVE-2024-7006) Tools changes ------------- Re-added tools: - fax2ps - fax2tiff - pal2rgb - ppm2tiff - raw2tiff - rgb2ycbcr (not installed) - thumbnail (not installed) - tiff2bw - tiff2rgba - tiffcmp - tiffcrop - tiffdither - tiffgt - tiffmedian - tiff2ps - tiff2pdf New/improved functionality: - tiff2rgba: Add background gradient option for alpha compositing - tiffcp: -i flag restored Bug fixes: - tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054 - tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection" - tiffcrop: fix buffer overflows, use after free (fixes :issue:`542`, :issue:`550`, :issue:`552`) - tiff2pdf: address Coverity scan issues - tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF - tiff2pdf: fix issue with JPEG restart-interval marker when converting from JPEG-compressed files (fixes :issue:`539`) - tiff2pdf: red and blue were being swapped for RGBA decoding (fixes :issue:`253`) - tiff2pdf: fixes :issue:`596` - thumbnail: address Coverity scan issues - tiffcp: Add check for limitMalloc return to fix Coverity 1603334 - tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG - tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputing to compression != JPEG (refs :issue:`571`) - tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG - tiffcp: Check also codec of input image, not only from output image (fixes :issue:`606`) - Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. - fax2ps and fax2tiff: memory leak fixes (fixes :issue:`476`) - tiffmedian: memory leak fixes (fixes :issue:`599`) - fax2tiff: fix EOFB interpretation (fixes :issue:`191`) - fax2tiff: fix issue with unreasonable width input (fixes :issue:`249`) - tiffcp and tiffcrop: fixes :issue:`228` - tiff2rgba: fixes :issue:`469` - tiffdither: fixes :issue:`473` - tiffdump: fix wrong printf formatter in error message (Coverity 1472932) - tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997) - tifcp/tiffset: use correct format specifiers Changes to contributed and unsupported tools -------------------------------------------- - contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680) Changes in TIFF v3.4beta016 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta016

References

Current Version

v3.4beta016 (no release tag)

Previous Version

v3.4beta004 (no references to earlier releases exist)

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • bit order was corrected for Pentium systems

  • a new define, HOST_BIGENDIAN, was added for code that wants to statically use information about native cpu byte order

Library changes

  • the G3/G4 decoder was replaced by a new one that is faster and has smaller state tables

  • Niles Ritter's client tag extension hooks were added

  • a new routine TIFFCurrentDirOffset() was added for applications that want to find out the file offset of a TIFF directory

  • the calculation of the number of strips in an image was corrected for images with certain esoteric configurations

  • a potential memory leak (very unlikely) was plugged

  • the TIFFReadRGBAImage support was completely rewritten and new, more flexible support was added for reading images into a fixed-format raster

  • YCbCr to RGB conversion done in the TIFFReadRGBAImage() support was optimized

  • a bug in JPEG support calculation of strip size was corrected

  • the LZW decoder was changed to initialize the code table to zero to lessen potential problems that arise when invalid data is decoded

  • tiffcomp.h() is now aware of OS/2

  • some function prototypes in tiffio.h and tiffiop.h that contained parameter names have been changed to avoid complaints from certain compilers

Portability support changes

  • Makefile.in has been corrected to use the parameters chosen by the configure script

Tools changes

  • fax2ps has been rewritten and moved over from the user contributed software

  • an uninitialized variable in pal2rgb has been fixed

  • ras2tiff now converts 24-bit RGB raster data so that samples are written in the proper order

  • tiff2ps has been updated to include fixes and enhancements from Alberto Accomazzi

  • tiffcp now has a "-o" option to select a directory by file offset

  • tiffinfo is now capable of displaying the raw undecoded image data in a file

  • tiffgt has been rewritten to use the new TIFFRGBAImage support and to handle multiple files

Changes in TIFF v3.4beta016 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta016

References

Current Version

v3.4beta016 (no release tag)

Previous Version

v3.4beta007

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • support was added for configuring the Deflate codec

  • support was added for the HTML documentation

  • codecs that are not configured for inclusion in the library are no longer compiled

Library changes

  • support was added for registering new codecs external to the library and for overriding the codecs that are builtin to the library

  • emulation support for the old DataType tag was improved

  • support was added for the SMinSampleValue and SMaxSampleValue tags

  • the library no longer ignores TileWidth and TileLength tags whose values are not a multiple of 16 (per the spec); this permits old, improperly written, images to be read

  • the support for the Predictor tag was placed in a reusable module so that it can be shared by multiple codecs

  • experimental compression support was added for the Deflate algorithm (using the freely available zlib package)

  • a new routine, TIFFWriteBufferSetup() was added à la the routine TIFFReadBufferSetup()

  • the DSO version of the library is now statically linked with the JPEG and Deflate libraries; this means applications that link against the DSO do not also need to link against these ancillary libraries

Tools changes

  • all the tools now use common code to process compress-oriented arguments

  • tiffdump should now compile on a Macintosh with MPW

Documentation changes

  • everything was updated

Contributed software changes

  • contrib/dbs/xtiff was made to compile

  • contrib/mac-mpw is new support for compiling the software on a Macintosh under MPW

  • contrib/tags is information on how to use the tag extenion facilities; consult contrib/tags/README for details

Changes in TIFF v3.4beta018 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta018

References

Current Version

v3.4beta018 (no release tag)

Previous Version

v3.4beta016

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • configure now recognizes IRIX 6.x systems

  • configure now uses ENVOPTS when searching for an ANSI C compiler; this fixes a problem configuring the software under HP/UX with the native C compiler

  • configure now correctly recognizes memory-mapped files are supported under AIX

Library changes

  • make install now properly installs the include files

  • some portability fixes from Bjorn Brox

  • the G3/G4 codec now warns about decoded rows that are longer than the image/tile width

  • changes from Frank Cringle to make the library work with the gcc-specific bounds checking software

  • miscellaneous fixes to TIFFPrintDirectory()

  • bug fix to correct a problem where TIFFWriteRawStrip() could not be used to automatically grow an image's length

Tools changes

  • fixes from Frank Cringle to update fax2tiff

  • portability fixes to tiff2bw and tiffcmp

  • tiffdump now uses the byte swapping routines in the library

Changes in TIFF v3.4beta024 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta024

References

Current Version

v3.4beta024 (no release tag)

Previous Version

v3.4beta018

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • It is now possible to setup the software to build only the library; configure recognizes this is the intent when the VERSION, tiff.alpha, and tif_version.c files are in the local directory (i.e. .)

  • configure no longer tries to setup HTML materials

  • include file directories needed in building the library are now specified with a DIRS_LIBINC config parameter

  • configure no longer checks for alternate compilers if CC is set; if the specified compiler is not found or is not appropriate the configuration procedure aborts

  • the port.h file generated by configure is now used only by the library and as such as have been moved to the libtiff directory

  • there is beginning support for building DSO's on systems other than IRIX

  • configure now verifies the JPEG and zlib directory pathnames by checking for well-known include files in these directories

  • configure no longer creates the dist directory needed only on SGI machines (for building SGI binary distributions)

  • a bug was fixed whereby configure would incorrectly set ENVOPTS when building the software with gcc under AIX

Library changes

  • two new typedefs were added to tiff.h: int8 and uint8 for signed and unsigned 8-bit quantities, respectively; these are currently used only by programs in the tools directory

  • the BadFaxLines, CleanFaxData, and ConsecutiveBadFaxLines tags are now supported with Group 4 compression

  • byte order is now correctly identified on 64-bit machines

  • a bug was fixed in the PackBits decoder where input data would appear short when a no-op run was present

  • a bug was fixed in calculations with very wide strips

  • TIFFWriteEncodedStrip() and TIFFWriteRawStrip() were extended to support dynamically growing the number of strips in an image (must set ImageLength prior to making calls though)

  • TIFFDefaultTileSize() now rounds tile width and height up to a multiple of 16 pixels, as required by the TIFF 6.0 specification

  • the file version.h is now built by a new mkversion program; this was done for portability to non-UNIX systems

  • support was added for the Acorn RISC OS (from Peter Greenham)

  • the builtin codec table is now made const when compiling under VMS so that libtiff can be built as a shared library

  • support for the PowerPC Mac (from Ruedi Boesch)

  • support for Windows NT/Windows 95 (from Scott Wagner)

Tools changes

  • the tools no longer include port.h

  • various portability fixes; mostly to eliminate implicit assumptions about how long int32 data types are

  • PostScript Level II additions to tiff2ps from Bjorn Brox

  • sgi2tiff now handles RGBA images

Documentation changes

  • the documentation has been updated to reflect the current state of the software

  • some routines have been moved to different manual pages to group like-routines together

Contributed software changes

  • support was added for the Acorn RISC OS (from Peter Greenham)

  • support for Windows NT/Windows 95 contributed for a previous version of this software was sort of incorporated (it's broken right now) (from Scott Wagner)

Changes in TIFF v3.4beta028 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta028

References

Current Version

v3.4beta028 (no release tag)

Previous Version

v3.4beta024

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • a "-noninteractive" flag was added to configure to control whether or not it prints and prompts for configuration information

  • various typos and fixes were made in configure for the the library-only build support (this and other configure fixes from Richard Mlynarik)

  • bugs were fixed in the handling of pathnames supplied for external packages; e.g. DIR_JPEG

  • the handling of SETMAKE is now done properly

  • the default prototype function declaration for pow() was corrected

  • a bug was fixed in libtiff/Makefile.in that caused installation to fail on systems without DSO support

Library changes

  • Acorn RISC O/S support that was accidentally left out of the left out of the previous distribution is present (from Peter Greenham)

  • complaints about unknown and/or unsupported codecs have been delayed until they are invoked; this permits applications to open images and look at tags even if the image data is compressed with an unknown/unsupported compression scheme

  • bugs in handling unknown tags have been corrected; applications that use multiple codecs, each with codec-specific tags, no longer generate confusing error messages

  • a missing pseudo-tag definition in the CCITT G3 codec was fixed (this problem caused core dumps in the tiffcp program)

  • pseudo-tags are now treated specially; they are always considered to be set (i.e. they do not use bits in the FIELD_* bit-vectors).

  • the use of strip chopping can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("C" to enable strip chopping and "c" to disable)

  • two bugs were fixed in the writing of opposite-endian byte-order files

  • support was added for three new fax-related tags registered to SGI: FaxRecvParams, FaxRecvTime, and FaxSubAddress

  • the bit order of image data read and written can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("B" to force MSB2LSB bit order, "L" for LSB2MSB bit order, and "H" for the bit order of the native CPU)

  • the byte order of image and tag data written to newly-created files can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("b" to force Big-Endian byte order and "l" to force Little-Endian byte order)

  • the use memory-mapped files for images opened read-only can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("M" to enable use of memory-mapped files and "m" to disable use)

  • the use of the WIN32 define in tiffiop.h has been replaced by __WIN32__

Tools changes

  • fax2ps now does a save and restore around each page of PostScript; this fixes a problem with VM overflow when printing a many-page document on some printers

  • a bug in the handling of 3-channel images by ras2tiff was fixed

  • tiffcp has new options to control the byte order of newly created files: "-B" for Big-Endian byte order, "-L" for Little-Endian byte order; a "-M" option to disable the use of memory-mapped files, and a "-C" option to disable the use of strip chopping

  • bugs were fixed in tiffcp handling of codec-specific tags

Documentation changes

  • the TIFFOpen() page has been updated to reflect the new optional open mode parameters

Contributed software changes

  • contrib/win95 contains information and code from Philippe Tenenhaus about using the software under Windows 95

  • contrib/winnt contains information and code from Dave Dyer about using the software under Windows NT

Changes in TIFF v3.4beta029 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta029

References

Current Version

v3.4beta029 (no release tag)

Previous Version

v3.4beta028

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • configure now relativizes pathname references given in "-L" options (as frequently specified when configuring ancillary packages)

  • problems related to configuring the software on Ultrix 4.4 have been corrected

  • the shell to use in Makefiles and scripts can now be set with the SCRIPT_SH configuration parameter

  • comments in config.site now correctly indicate how to setup the use of ancillary packages

Library changes

  • mods for building the software on a Mac using the MetroWerks CodeWarrior compilers

  • a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in a strip/tile might not be decoded; this was seen only when decoding multi-strip images

  • a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not being properly registered

Contributed software changes

  • contrib/mac-cw contains information and code from Niles Ritter about building the software with the MetroWerks CodeWarrior compilers on Macintosh systems

Changes in TIFF v3.4beta031 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta031

References

Current Version

v3.4beta031 (no release tag)

Previous Version

v3.4beta029

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • configure now captures significantly more information in the config.log file and provides more information when it is unable to setup a configuration

  • support was added for building shared libraries on more systems: AIX, HPUX, Solaris, and Linux.

  • a new configuration parameter LIBCOPTS was added for passing arguments to the C compiler to use when building only the library; this is part of the enhanced support for building shared libraries

  • include files for optional packages that reside in /usr/include are now handled correctly

  • build trees may now be configured using either relative or absolute pathnames to the source distribution

  • several new configuration parameters were added, mainly for building shared libraries: DIST_MAJOR, DIST_MINOR, DIST_ALPHA, and DSOSUF_VERSION

Library changes

  • the Deflate support has been revised: it requires version 0.99 of the zlib software distribution, the output format has changed and is incompatible with previous versions of this library (each strip now includes a header read and written by the zlib library)

  • the codec name printed by the TIFFPrintDirectory() routine is now taken from the codec table instead of from a builtin table; this means that application-defined codecs are handled correctly

  • a new symbol was added that contains the library version number; this can be used to do a compile-time compatibility check of the library version

Documentation changes

  • the creation and installation of manual pages was redone; it now implements the documented "configuration scheme"

Changes in TIFF v3.4beta032 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta032

References

Current Version

v3.4beta032 (no release tag)

Previous Version

v3.4beta031

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • various fixups and subtle improvements to configure from Richard Mlynarik

Library changes

  • a new codec from Pixar designed for high-resolution color images; note that this codec is not configured by default

  • a bug fix for reading tags with a single FLOAT value

  • change to the TIFFGetField() calling convention: a tag that has a single value of type DOUBLE is now retrieved by passing a double* instead of a double** (this change makes the handling of tags with DOUBLE values identical to the handling of tags with FLOAT values)

  • fix to VMS support for the handling of floating point values

Tools changes

  • tiffdump now handles tags with FLOAT and DOUBLE values

Contributed software changes

  • updates to the Acorn OS support from Peter Greenham

Changes in TIFF v3.4beta033 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta033

References

Current Version

v3.4beta033 (aka the v3.4 release) (no release tag)

Previous Version

v3.4beta032

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • support was added for building the library as a DSO under OSF/1

Library changes

  • fixes to the Pixar codec

  • portability mods for VMS

Tools changes

  • fixes to gif2tiff and ppm2tiff for building under MS/DOS

  • portability mods to fax2ps and ycbcr for VMS

Contributed software changes

  • a new package from Alexander Lehmann for building the library and tools under MS/DOS with DJGPP v2

  • updated VMS support from Karsten Spang

Changes in TIFF v3.4beta034 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta034

References

Current Version

v3.4beta034 (no release tag)

Previous Version

v3.4beta033

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • support was added for building the library as a DSO under NetBSD

  • a bug was fixed in the DSO support for Linux

  • the handling of version strings has changed slightly to simplify parsing

  • a new parameter, TIFFLIBREF, was added to control how the library is referenced when linking programs in the tools directory

Library changes

  • DSO creation under Solaris now forces the DSO name with a -h option

  • the interface to the mkversion program was changed to eliminate the need to parse files

  • a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder

  • ANSI IT8 TIFF/IT tag definitions were added to tiff.h

Changes in TIFF v3.4beta035 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta035

References

Current Version

v3.4beta035 (no release tag)

Previous Version

v3.4beta034

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • support was added installing the HTML documentation

  • support was added for building the library as a DSO under FreeBSD

Library changes

  • the interface to the mkversion program was restored to the form used prior to v3.4beta034

  • several portability problems for 16-bit systems were fixed

Changes in TIFF v3.4beta036 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.4beta036

References

Current Version

v3.4beta036 (no release tag)

Previous Version

v3.4beta035

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • support was added for building the library as a DSO under HP-UX with the native C compiler

  • tools are now built with explicit pathnames for the DSO under IRIX, Solaris, and Linux

  • DSO configuration support for Linux was changed to require that libc.so only be readable (not executable)

Library changes

  • support was add for ICC: NumberOfInks, and ICCProfile

  • a memory leak caused by doing TIFFSetDirectory(0) was fixed

  • a bug was fixed whereby certain multi-directory files were not properly handled when accessed by mapping the data into memory

  • the strip chopping support is now always compiled into the library with the default usage controlled by a STRIPCHOP_DEFAULT configuration parameter

  • the strip chopping support no longer chops tiled images

  • all static strings are now const---for shared libraries

  • the logic for estimating the strip size of images without StripByteCounts tag was improved by handling PlanarContig images differently from PlanarSeparate

  • a bug was fixed in the G3 codec when converting the Y resolution of data specified in metric units

  • a bug was fixed in the G3/G4 decoder for data where lines terminate with a v0 code

  • the TIFFRGBAImage support was changed to scale 16-bit colormap entries more conservatively to avoid problems with applications that do not generate fully saturated pixel values

  • the LZW decoder was changed to use a more conservative scheme when bounds checking the hash table array; this avoids pitfalls with systems that load objects into memory in unusual locations

  • a bug was fixed in TIFFPrintDirectory() handling of the InkNames tag

  • TIFFPrintDirectory() now understands NumberOfInks and ICC-related tags

  • the routines for reading image data now provide more useful information when a read error is encountered

  • support was added for compiling with Microsoft Visual C++ 4.0

Tools changes

  • a bug was fixed in pal2rgb colormap handling

  • tiff2ps:

    • now includes John Wehle's changes for maintaining the aspect ratio of images when scaling and for honoring the deadzone on a page when generating PostScript Level II

    • does a better job guarding against the mishandling of greyscale images

    • now correctly converts X- and Y-resolution values specified in metric units

  • tiffdump:

    • has a new "-m" option to control the maximum number of indirect data values printed for a tag (by default 24)

    • understands several new tags

    • now shows any terminating null in ASCII strings

  • tiffinfo now suppresses strip chopping when interpreting an image; a new "-z" option has been added to enable strip chopping

Changes in TIFF v3.5.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.1

References

Current Version

v3.5.1 (no release tag)

Previous Version

v3.4beta037 (missing release notes, go to v3.4beta036)

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

None.

Library changes

  • Support was added for IPTC Newsphoto metadata (TIFFTAG_IPTCNEWSPHOTO)

  • Support was added for photoshop caption handling (TIFFTAG_PHOTOSHOP)

Contributed software changes

  • Bill Radcliffe's iptcutil was added to the contrib subdirectory . It can convert an IPTC binary blob to ASCII text and vice-versa. The blob itself can be extracted from or added to an image with the ImageMagick convert (1) utility.

Changes in TIFF v3.5.2 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.2

References

Current Version

v3.5.2 (no release tag)

Previous Version

v3.5.1

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • Corrected alpha versioning.

  • Removed distinction between alpha and release targets in Makefile.in.

  • Added release.stamp target, which tags cvs tree, and updates RELEASE-DATE

  • Added releasediff target, which diffs tree with source as of date in RELEASE-DATE

  • Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving away from alpha/non-alpha distinctions).

Library changes

  • Added IRIX/gcc, and OSF/1 4.x support on behalf of Albert Chin-A-Young.

  • Added TIFFReassignTagToIgnore() API on behalf of Bruce Cameron. Man page still pending.

  • pre-remove so link before softlink in LINUXdso action in libtiff/Makefile.in to avoid failure on LINUXdso builds other than the first.

  • Fixed problem with cvtcmap() in tif_getimage.c modifying the colormaps owned by the TIFF handle itself when trying to fixup wrong (eight bit) colormaps. Corrected by maintaining a private copy of the colormap.

  • Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in tif_getimage.c.

  • Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested by Christopher Lawton.

  • Set O_BINARY for tif_unix.c open() ... used on cygwin for instance.

  • Added CYGWIN case in configure.

  • Applied Francois Dagand's patch to handle fax decompression bug. (sizes >= 65536 were failing)

Contributed software changes

  • Added addtiffo (add overviews to a TIFF file) in contrib. Didn't put it in tools since part of it is in C++.

Changes in TIFF v3.5.3 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.3

References

Current Version

v3.5.3 (tag Release-v3-5-3)

Previous Version

v3.5.2

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

Please note the most important change: LZW compression has been removed.

Unisys has the patent on LZW compression and have been very active in their enforcement of late, demanding payments of $5000 or more from websites using unlicensed software to create GIF's. They could well do the same do persons using libtiff to create LZW compressed TIFF images.

From Burn All GIF's Day:

The catch is that it appears to be difficult or impossible to get a Unisys license to use LZW in free software that complies with the Open Source Definition

Unfortunately, the removal of LZW compression means that saved image size has grown dramatically. Without a change in the TIFF spec to support another lossless compression format, this is unavoidable.

The library can use zip for lossless compression, but as this is not part of the spec, TIFFs using zip compression may not work with other software.

We will be making a patch available that will contain the LZW compression code for users who have either obtained a license from Unisys or are willing to risk it.

LZW decompression is unchanged.

Software configuration changes

  • Added zip creation to release makefile target

Library changes

  • Added html for TIFFWriteTile.3t man page.

  • Added some changes to tif_write.c to support rewriting existing fixed sized tiles and strips. Code mods disabled by default, only enabled if REWRITE_HACK is defined for now.

  • Added TIFFWriteTile.3t man page.

  • Added notes on use of makefile.vc in build.html, and fixed email subscription address.

  • Did some casts cleaning up to reduce compiler warnings in tif_fax3.c, from Bruce Cameron---modifications of changes made by Frank (sun cc still complained on cast).

  • fixed various VC++ warnings as suggested by Gilles Vollant.

  • Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to not imply applications are responsible for image data swapping.

  • HTML-ized the man pages, added to html/man.

  • Removed LZW Compression to comply with Unisys patent extortion.

  • Corrected one remaining 16 -> 32 bit value in tif_fax3.c, From Ivo Penzar.

  • Added patch from Ivo Penzar to have TiffAdvanceDirectory() handle memory mapped files. Ivo Penzar.

Contributed software changes

  • Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c

Changes in TIFF v3.5.4 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.4

References

Current Version

v3.5.4 (tag Release-v3-5-4)

Previous Version

v3.5.3

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • None.

Library changes

  • Added Pixar tag support. Contributed by Phil Beffery.

  • Made one more change to tif_dir.c for removal of LZW compression. Also added notice when LZW compression invoked.

  • Fixed bug that caused LZW (non) compression to segfault. Added warning about LZW compression removed being removed, and why.

Tools changes

  • Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions in tools to reflect removal of LZW compression

  • Added nostrip to install in tools/Makefile.in so that debugging symbols are kept.

  • Made Packbits the default compression in tools/tiff2rgba.c instead of LZW.

Changes in TIFF v3.5.5 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.5

References

Current Version

v3.5.5 (tag Release-v3-5-5)

Previous Version

v3.5.4

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • configure: added test for libc6 for linux targets. Bug reported by Stanislav Brabec.

  • configure: fixed bugs in sed scripts (applied sed script s:/@:s;@:;s:/s;;:;: to configure). fix submitted by Stanislav Brabec.

  • tools/iptcutil was not in files list, and wasn't being added to tar archive. Updated Makefile.in.

  • Added 3.5 docs to html/Makefile.in. Thanks to Stanislav Brabec

  • Fixed tools/tiffcmp so that stopondiff testing works. Patch care of Joseph Orost.

  • Added fax3sm_winnt.c to distribution list in Makefile.in.

  • Added libtiff/libtiff.def to TIFFILES distribution list.

Library changes

  • tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 conversion for the run arrays.

  • Set td_sampleformat default to SAMPLEFORMAT_UINT instead of SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c.

  • Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c.

  • Patched tif_fax3.c so that dsp->runs is allocated a bit bigger to avoid overruns encountered with frle_bug.tif.

  • Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is set to 1, and added default (off) setting in tiffconf.h. This should eventually be set by the configure script somehow. The original work on all these 2-4GB changes was done by Peter Smith.

  • Modified tif_win32.c to support 2-4GB seeks.

  • tentatively changed toff_t to be unsigned instead of signed to facilitate support for 2-4GB files.

  • Updated a variety of files to use toff_t. Fixed some mixups between toff_t and tsize_t.

  • Set tif_rawdatasize to zero when freeing raw data buffer in TIFFWriteDirectory().

  • Enabled REWRITE_HACK in tif_write.c by default.

  • Fix bug in tif_write.c when switching between reading one directory and writing to another.

  • Made TIFFWriteCheck() public, and added TIFFCreateDirectory()

  • Added TIFFmemory functions to libtiff.def.

  • Added libtiff/libtiff.def to TIFFILES distribution list.

Tools changes

  • fax2ps:

    • Fixed mixup of width and height in bounding box statement as per submission by Nalin Dahyabhai.

    • Modified printruns to take uint32 instead of uint16. Patch courtesy of Bernt Herd.

  • Largely reimplemented contrib/addtiffo to avoid temp files, updating the TIFF file in place. Fixed a few other bugs to.

  • Altered descriptions in tools to reflect "by default" lzw not supported

LZW compression kit changes

  • created mangle-src.sh -- sed scripts to munge src into LZW enabled format. Thanks to Stanislav Brabec.

  • created Makefile

  • merged tif_dir.c with current source.

  • Created lzw compression kit, as a new CVS module (libtiff-lzw-compression-kit).

  • Updated index.html to note lzw compression kit.

Changes in TIFF v3.5.6beta — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.6beta

References

Current Version

v3.5.6beta (no release tag)

Previous Version

v3.5.5

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • Added GNULDdso target and switched linux and freebsd to use it.

  • tools/Makefile.in: Modified to install properly on SGI.

  • configure: Fixed DSO test for Linux as per patch from Jan Van Buggenhout.

Library changes

  • tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory as per Remote Sensing bugzilla #18 [no longer available] from mailto:vandrove@vc.cvut.cz.

  • Modified tif_packbits.c decoding to avoid overrunning the output buffer, and to issue a warning if data needs to be discarded. See Remote Sensing bugzilla #18 [no longer available]

  • Modified TIFFClientOpen() to emit an error on an attempt to open a compressed file for update (O_RDWR/"r+") access. This is because the compressor/decompressor code gets very confused when the mode is O_RDWR, assuming this means writing only. See bug Remote Sensing bugzilla #13 [no longer available]

  • Applied patch for 0x0000 sequences in tif_fax3.h definition of EXPAND1D as per bug Remote Sensing bugzilla #11 [no longer available] (from Roman).

  • Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve cygwin compatibility.

  • Applied patch from Roman Shpount to tif_fax3.c. This seems to be a proper fix to the buffer sizing problem. See Remote Sensing bugzilla #11 [no longer available]

  • Fixed tif_getimage.c to fix overrun bug with YCbCr images without downsampling. Remote Sensing bugzilla #10 [no longer available] Thanks to Nick Lamb for reporting the bug and proving the patch.

  • Fixed tif_jpeg.c to avoid destroying the decompressor before we are done access data thanks to bug report from: Michael Eckstein.

  • tif_open.c: Don't set MMAP for O_RDWR files.

  • tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY so that files opened for update can be strip chopped too.

  • tif_read.c: fixed up bug with files missing rowsperstrip and the strips per separation fix done a few weeks ago.

  • Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and SAMPLEFORMAT_COMPLEXINT.

  • index.html, bugs.html: added bugzilla info.

  • tif_read.c: fix subtle bug with determining the number of rows for strips that are the last strip in a separation but not the last strip of all in TIFFReadEncodedStrip().

  • Applied 16/32 bit fix to tif_fax3.c. Fix supplied by Peter Skarpetis.

  • Modified tiffio.h logic with regard to including windows.h. It won't include it when building with __CYGWIN__.

  • README: update to mention {REDACTED - defunct web site}, don't list Sam's old email address.

  • libtiff/tif_dirread.c: Don't use estimate strip byte count for one tile/strip images with an offset, and byte count of zero. These could be "unpopulated" images.

  • tif_win32.c: Applied patch to fix overreads and ovverwrites caught by BoundsChecker. From Arvan Pritchard (untested).

  • tif_getimage.c: Applied patch to silence VC6 warnings. From Arvan Pritchard.

  • tif_lzw.c: Applied patch to silence VC6 warnings. From Arvan Pritchard.

  • libtiff/tif_apple.c: Applied "Carbon" support patches supplied by Leonard Rosenthol. May interfere with correct building on older systems. If so, please let me know.

Tools changes

  • tools/rgb2ycbcr.c: fixed output strip size to account for vertical roundup if rows_per_strip not a multiple of vertical sample size.

  • tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT.

  • Modified tiff2bw to ensure portions add to 100%, and that white is properly recovered. See bug Remote Sensing bugzilla #15 [no longer available] Patch c/o Stanislav Brabec

Contributed software changes

  • contrib/addtiffo: Added "averaging" resampling option.

  • Added contrib/stream (stream io) code submitted by Avi Bleiweiss.

LZW compression kit changes

  • updated tif_dir.c to reflect changes to no-lzw tif_dir.c.

Changes in TIFF v3.5.7 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.5.7

References

Current Version

v3.5.7 (tag Release-v3-5-7)

Previous Version

v3.5.6beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Software configuration changes

  • libtiff/libtiff.def: Brent Roman submitted new version adding several missing entry points. Also add a few other entry points later.

  • configure, Makefile.in, etc: added support for OPTIMIZER being set from config.site.

  • config.guess: updated wholesale to an FSF version apparently from 1998 (as opposed to 1994). This is mainly inspired by providing for MacOS X support.

  • configure/config.site: modified to check if -lm is needed for MACHDEPLIBS if not supplied by config.site. Needed for Darwin.

  • libtiff/tiff.h: Applied hack to try and resolve the problem with the inttypes.h include file on AIX. (bug Remote Sensing bugzilla #39 [no longer available])

  • configure, *Makefile.in: Various changes to improve configuration for HP/UX specifically, and also in general. (bug Remote Sensing bugzilla #40 [no longer available]) They include:

    • Try to handle /usr/bin/sh instead of /bin/sh where necessary.

    • Upgrade to HP/UX 10.x+ compiler, linker and dso options.

    • Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP

    • Use -${MAKEFLAGS} in sub makes from makefiles.

    • Fixed SCRIPT_SH/SHELL handling.

  • configure: Changes for DSO generation on AIX provided by John Marquart.

  • configure, libtiff/Makefile.in: Modified to build DSOs properly on Darwin thanks to Robert Krajewski and Keisuke Fujii.

  • configure, libtiff/Makefile.in: applied OpenBSD patches as per bug Remote Sensing bugzilla #61 [no longer available].

  • Makefile.in: added DESTDIR support as per bug Remote Sensing bugzilla #60 [no longer available].

  • libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H has been included.

  • man/Makefile.in: add TIFFClientOpen() link as per debian submitted bug Remote Sensing bugzilla #66 [no longer available].

  • libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@ in two places.

Library changes

  • tif_fax3.c: keep rw_mode flag internal to fax3 state to remember whether we are encoding or decoding. This is to ensure graceful recovery if TIFFClientOpen() discovers an attempt to open a compressed file for "r+" access, and subsequently close it, as it resets the tif_mode flag to O_RDONLY in this case to avoid writes, confusing the compressor's concept of whether it is in encode or decode mode.

  • tif_luv.c, tiff.h, tiffio.h: New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward. He writes:

    • I improved the gamut-mapping function in tif_luv.c for imaginary colors, because some images were being super-saturated on the input side and this resulted in some strange color shifts in the output.

    • I added a psuedotag in tiff.h to control random dithering during LogLuv encoding. This is turned off by default for 32-bit LogLuv and on for 24-bit LogLuv output. Dithering improves the average color accuracy over the image.

    • I added a #define for LOG_LUV_PUBLIC, which is enabled by default in tiffio.h, to expose internal routines for converting between LogLuv and XYZ coordinates. This is helpful for writing more efficient, specialized conversion routines, especially for reading LogLuv files.

  • libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS.

  • Added TIFFTAG_COPYRIGHT support.

  • tif_getimage.c: Added support for 16bit minisblack/miniswhite images in RGBA interface.

  • libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per bug Remote Sensing bugzilla #44 [no longer available].

  • libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the case of writing TIFF_BYTE/TIFF_SBYTE fields as per bug Remote Sensing bugzilla #43 [no longer available].

  • libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to force use of uint32 counts instead of short counts.

  • libtiff/tif_dirinfo.c: moved pixar and copyright flags to ensure everything is in order.

  • Integrated experimental OJPEG support from Scott Marovich of HP.

  • libtiff/tif_open.c: Seek back to zero after failed read, before writing header.

  • libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ when checking for 64 bit architectures as per bugzilla bug Remote Sensing bugzilla #67 [no longer available].

  • libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() in TIFFReadRGBATile() to avoid issues in cases of overlapping buffers. See bug Remote Sensing bugzilla #69 [no longer available] in Bugzilla.

  • libtiff/tif_getimage.c: Don't complain for CMYK (separated) images with more than four samples per pixel as per bug Remote Sensing bugzilla #73 [no longer available].

  • libtiff/tif_getimage.c: relax handling of contig case where there are extra samples that are supposed to be ignored as per bug Remote Sensing bugzilla #75 [no longer available]. This should now work for 8bit greyscale or paletted images.

  • libtiff/tif_packbits.c: fixed memory overrun error as per bug Remote Sensing bugzilla #77 [no longer available].

  • libtiff/tif_getimage.c: Fixed problem with reading strips or tiles that don't start on a tile boundary. Fix contributed by Josep Vallverdu (from HP), and further described in bug Remote Sensing bugzilla #47 [no longer available].

  • libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to always use the "safe" version, even if there is a very slight cost in performance as per bug Remote Sensing bugzilla #54 [no longer available].

  • libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an error about LZW not being available.

  • libtiff/tif_dir.c: propagate failure to initialize compression back from TIFFSetField() as an error status, so applications can detect failure.

  • libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug as per bug Remote Sensing bugzilla #78 [no longer available].

  • libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function. Updated TIFFWriteDirectory() man page to include TIFFRewriteDirectory().

  • libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases in keeping with TIFF 6.0 standard in tiff.h as per bug Remote Sensing bugzilla #83 [no longer available].

  • Added PHOTOMETRIC_ITULAB as per bug Remote Sensing bugzilla #90 [no longer available].

Tools changes

  • Brent Roman contributed updated tiffcp utility (and tiffcp.1) with support for extracting subimages with the ,n syntax, and also adding the "-b" bias removal flag.

  • tiff2ps.c, tiff2ps.1: Substantial changes to tiff2ps by Bruce A. Mallett, including a faster encoder, fixes for level 2 PostScript, and support for the imagemask operator.

  • fax2ps.c: Helge (libtiff at oldach.net) submitted fix that corrects behaviour for non-Letter paper sizes. (bug Remote Sensing bugzilla #35 [no longer available]) It fixes two problems:

    Without scaling ("-S") the fax is now centered on the page size specified with "-H" and/or "-W". Before, fax2ps was using an obscure and practically useless algorithm to allocate the image relative to Letter sized paper which sometime sled to useless whitespace on the paper, while at the same time cutting of the faxes printable area at the opposite border.

    Second, scaling now preserves aspect ratio, which makes unusual faxes (in particular short ones) print properly.

  • thumbnail.c: changed default output compression to packbits from LZW since LZW isn't generally available.

  • tiff2rgba.c: added "-n" flag to avoid emitting alpha component. Also added a man page for tiff2rgba.

  • tiffcmp.c: Fixed multi samples per pixel support for ContigCompare() as per bug Remote Sensing bugzilla #53 [no longer available]. Updated bug section of tiffcmp.1 to note tiled file issues.

  • libtiff/tif_getimage.c: Fixed so that failure is properly reported by gtTileContig(), gtStripContig(), gtTileSeparate() and gtStripSeparate() as per bug Remote Sensing bugzilla #51 [no longer available].

Contributed software changes

  • Fixed distribution to include contrib/addtiffo/tif_ovrcache.c and contrib/addtiffo/tif_ovrcache.h.

LZW compression kit changes

  • Rewrote lzw patching process so that is required to enable full LZW support is to drop the tif_lzw.c from the libtiff-lzw-compression-kit over the one in the libtiff directory.

  • Some changes were made to make recovery from failure to initialize the LZW compressor more graceful.

  • Note that as distributed libtiff support LZW decompression, but not LZW compression.

Changes in TIFF v3.6.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.6.0

References

Current Version

v3.6.0 (tag Release-v3-6-0)

Previous Version

v3.5.7

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • New utility raw2tiff for converting raw rasters into TIFF files.

  • Lots of new tiff2ps options.

  • Lots of new fax2tiff options.

  • Lots of bug fixes for LZW, JPEG and OJPEG compression.

Custom Tag Support

The approach to extending libtiff with custom tags has changed radically. Previously, all internally supported TIFF tags had a place in the private TIFFDirectory structure within libtiff to hold the values (if read), and a "field number" (ie. FIELD_SUBFILETYPE) used to identify that tag. However, every time a new tag was added to the core, the size of the TIFFDirectory structure would change, breaking any dynamically linked software that used the private data structures.

Also, any tag not recognised by libtiff would not be read and accessible to applications without some fairly complicated work on the applications part to pre-register the tags as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on libtiff.

Among other things this approach required the extension code to access the private libtiff structures ... which made the higher level non-libtiff code be locked into a specific version of libtiff at compile time. This caused no end of bug reports!

The new approach is for libtiff to read all tags from TIFF files. Those that aren't recognised as "core tags" (those having an associated FIELD_ value, and place for storage in the TIFFDirectory structure) are now read into a dynamic list of extra tags (td_customValues in TIFFDirectory). When a new tag code is encountered for the first time in a given TIFF file, a new anonymous tag definition is created for the tag in the tag definition list. The type, and some other metadata is worked out from the instance encountered. These fields are known as "custom tags".

Custom tags can be set and fetched normally using TIFFSetField() and TIFFGetField(), and appear pretty much like normal tags to application code. However, they have no impact on internal libtiff processing (such as compression). Some utilities, such as tiffcp will now copy these custom tags to the new output files.

As well as the internal work with custom tags, new C API entry points were added so that extension libraries, such as libgeotiff, could define new tags more easily without accessing internal data structures. Because tag handling of extension tags is done via the "custom fields" mechanism as well, the definition provided externally mostly serves to provide a meaningful name for the tag.

The addition of "custom tags" and the altered approach to extending libtiff with externally defined tags is the primary reason for the shift to the 3.6.x version number from 3.5.x.

Software configuration changes

Library changes

Tools changes

Contributed software changes

  • Fixed distribution to include contrib/addtiffo/tif_ovrcache.c, contrib/addtiffo/tif_ovrcache.h.

  • libtiff/contrib/win95: renamed to contrib/win_dib. Added new Tiffile.cpp example of converting TIFF files into a DIB on Win32 as per bug Remote Sensing bugzilla #143 [no longer available].

LZW compression kit changes

  • LZW compression kit synchronized with actual libtiff version.

Changes in TIFF v3.6.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.6.1

References

Current Version

v3.6.1 (tag Release-v3-6-1)

Previous Version

v3.6.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • New utility tiff2pdf for converting TIFF images directly into PDF.

  • New TIFFcolor color conversion module.

  • Full support for Orientation tag in TIFFRGBAImage interface.

  • Many bugs fixed.

Software configuration changes

  • libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG library.

  • Makefile.in: Add an absolute path to the test_pics.sh call.

  • Makefile.in: Add an absolute path to the test_pics.sh call.

  • libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD typedefs.

  • configure, libtiff/Makefile.in, libtiff/mkversion.c: Relative buildings fixed.

  • Makefile.in: Add an absolute path to the test_pics.sh call.

Library changes

  • libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h: Added support for ReferenceBlackWhite tag handling when converted from YCbCr color space as per bug Remote Sensing bugzilla #120 [no longer available].

  • libtiff/tif_getimage.c, libtiff/tif_aux.c: Read WhitePoint tag from the file and properly use it for CIE Lab 1976 to RGB transform.

  • libtiff/tif_getimage.c, libtiff/tiffio.h: Finally resolved problems with orientation handling. TIFFRGBAImage interface now properly supports all possible orientations, i.e. images will be flipped both in horizontal and vertical directions if required. 'Known bugs' section now removed from the appropriate manual pages.

  • libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine, reported by Antonio Scuri.

  • libtiff/tiffio.h, libtiff/tif_codec.c: Added new function TIFFIsCODECConfigured(), suggested by Ross Finlayson.

  • libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly extract the fields from the OJPEG files. Patch supplied by Ross Finlayson.

  • libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo() declaration replaced with _TIFFFindOrRegisterFieldInfo() as reported by Ross Finlayson.

  • libtiff/tif_dirinfo.c: Implemented binary search in _TIFFMergeFieldInfo(). Patch supplied by Ross Finlayson.

  • tif_dirread.c: do not mark all anonymously defined tags to be IGNORE (as it was done in 3.6.0).

  • libtiff/tiff.h, libtiff/tif_dirinfo.c: Added support for IFD (13) datatype, introduced in "Adobe PageMaker TIFF Technical Notes".

  • libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h: New color space conversion code: CIE L*a*b* 1976 images now supported by the TIFFRGBAImage interface. YCbCr to RGB conversion code also moved there and now has TIFFcolor publicly available interface. These routines currently used in TIFFRGBAImage interface only and not supported in other libtiff tools yet. So if you want, for example, to convert CIE Lab image into PostScript file you should do it in two steps: change colorspace to RGB using tiff2rgba utility and then process it with the tiff2ps.

  • libtiff/tif_tile.c: Remove spurious use of "s" (sample) in the planarconfig_contig case in TIFFComputeTile() as per bug Remote Sensing bugzilla #387 [no longer available].

  • libtiff/tiffiop.h: New macros: TIFFmax and TIFFmin.

  • libtiff/tiffio.h, libtiff/tif_strip.c: Added TIFFRawStripSize() function as suggested by Chris Hanson.

  • libtiff/tif_lzw.c, libtiff/tif_fax3.c: Proper support for update mode as per bug Remote Sensing bugzilla #424 [no longer available].

Tools changes

  • tiff2pdf:: New tool, written by Ross Finlayson, to directly convert TIFF files to PDF.

  • tiffgt: Unmaintained and platform dependent sgigt utility removed and replaced with the completely rewritten portable tool (depend on OpenGL and GLUT). This tool will not build by default.

  • ras2tiff: Properly determine SUN Rasterfiles with the reverse byte order (it is reported by the magic header field). Problem reported by Andreas Wiesmann.

  • raw2tiff: Implemented image size guessing using correlation coefficient calculation between two neighbour lines.

Contributed software changes

  • contrib/pds/tif_pdsdirread.c, contrib/pds/tif_pdsdirwrite.c: Use TIFFDataWidth() function instead of tiffDataWidth array.

LZW compression kit changes

Changes in TIFF v3.7.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.0

References

Current Version

v3.7.0 (tag Release-v3-7-0)

Previous Version

v3.7.0beta2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Several bugs found after 3.7.0beta2 release were fixed.

Software configuration changes

  • ltmain.sh: Fix for MinGW compilation.

Library changes

  • libtiff/tif_dirread.c, libtiff/tif_jpeg.c, libtiff/tif_luv.c, libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c, libtiff/tif_write.c: Handle the zero strip/tile sizes properly (Dmitry V. Levin, Marcus Meissner).

  • libtiff/tif_dirinfo.c: Type of the TIFFTAG_SUBIFD field changed to TIFF_IFD.

  • Preliminary support for BigTIFF files: now libtiff can recognize and reject to open such images. ;-)

  • libtiff/tif_dir.c: Initialize td_tilewidth and td_tilelength fields of the TIFFDirectory structure with the 0 instead of -1 to avoid confusing integer overflows in TIFFTileRowSize() for striped images.

  • libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation of tif_fieldinfo as per bug Remote Sensing bugzilla #630 [no longer available]

  • libtiff/tif_compress.c: Improved error reporting in TIFFGetConfiguredCODECs() (Dmitry V. Levin).

Tools changes

  • tiffcmp.c (leof()): Renamed from "eof" in order to avoid conflict noticed under MinGW.

  • tiff2pdf.c: Fixed TransferFunction tag handling reported by Ross A. Finlayson.

Contributed software changes

  • None.

LZW compression kit changes

  • This one is not longer needed.

Changes in TIFF v3.7.0alpha — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.0alpha

References

Current Version

v3.7.0alpha (tag Release-v3-7-0-alpha)

Previous Version

v3.6.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Significant changes in software configuration: we are switched to GNU autotools now.

  • tiffset: Set any libtiff supported tags. Tags can be supplied by the mnemonic name or number.

Software configuration changes

  • Get rid of the old configuration system and switch to GNU autotools.

Library changes

Tools changes

  • tiffset: Set any libtiff supported tags. Tags can be supplied by the mnemonic name or number.

  • ycbcr.c: fixed main() declaration as per: Remote Sensing bugzilla #513 [no longer available].

  • tiffsplit: Don't forget to copy PhotometricInterpretation tag.

  • tiffsplit:

    • Fixed problem with unproperly written multibyte files. Now output files will be written using the same byte order flag as in the input image. See Remote Sensing bugzilla #574 [no longer available].

    • Copy JPEGTables tag contents for JPEG compressed images. Reported by Artem Mirolubov.

  • tiffcp:

    • Close output file on normal exit.

    • Don't emit warnings when Orientation tag does not present in the input image.

    • Properly set Photometric Interpretation in case of JPEG compression of grayscale images.

    • Fixed problem with wrong interpretation of the InkNames tag as per bug Remote Sensing bugzilla #466 [no longer available]. Memory leak fixed.

    • Fixed problem with wrong PhotometricInterpretation setting for non-RGB images.

Contributed software changes

  • Outdated stuff removed.

  • Almost all programs are synchronized with the current libtiff and should compile without problems.

LZW compression kit changes

  • No changes.

Changes in TIFF v3.7.0beta — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.0beta

References

Current Version

v3.7.0beta (tag Release-v3-7-0beta)

Previous Version

v3.7.0alpha

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • LZW compression enabled by default. You don't need the separate compression kit anymore.

  • bmp2tiff: Added new utility to convert Windows BMP files into TIFFs.

  • The first attempt to implement a test suite.

Software configuration changes

  • Many portability fixes in the new autotooled build suite.

Library changes

  • libtiff/tif_luv.c, libtiff/tif_next.c, libtiff/tif_thunder.c: Several buffer overruns fixed, as noted by Chris Evans.

  • BSD data types (u_char, u_short, u_int, u_long) is no longer used internally in the libtiff. Should result in simpler configuration and better portability.

  • libtiff/tiff.h: Fix column tagging. Reference current Adobe XMP specification. Reference libtiff bug tracking system to submit private tag additions.

  • libtiff/tif_dirread.c: Don't reject to read tags of the SamplesPerPixel size when the tag count is greater than number of samples as per bug Remote Sensing bugzilla #576 [no longer available].

  • libtiff/tiffio.h, libtiff/tif_open.c: Applied patches from Joris Van Damme to avoid requirement for tiffiop.h inclusion in some applications. Look for details here: http://www.asmail.be/msg0054799560.html.

  • libtiff/tiffiop.h, libtiff/tif_dirinfo.c: Fixed problem with the static variable as per bug Remote Sensing bugzilla #593 [no longer available].

  • libtiff/tif_lzw.c: LZW compression code is merged back from the separate package. All libtiff tools are updated to not advertise an absence of LZW support.

  • libtiff/tif_dir.c: Call TIFFError() instead of producing warnings when setting custom tags by value. Reported by Eric Fieleke.

Tools changes

  • tiff2ps: Avoid zero division in setupPageState() function; properly initialize array in PSDataBW().

  • tiff2pdf: Multiple bugfixes.

  • ras2tiff: Fixed issue with missed big-endian checks as per bug Remote Sensing bugzilla #586 [no longer available].

  • bmp2tiff: Added new utility to convert Windows BMP files into TIFFs.

Contributed software changes

  • No changes.

LZW compression kit changes

  • This one is not longer needed.

Changes in TIFF v3.7.0beta2 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.0beta2

References

Current Version

v3.7.0beta2 (tag Release-v3-7-0beta2)

Previous Version

v3.7.0beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • The code has been reviewed by Dmitry Levin: added checks for values, returned by the space allocation functions, fixed problems with the possible integer overflows.

Software configuration changes

  • Several fixes in the test suite.

Library changes

  • Preliminary support for BigTIFF files: now libtiff can recognize and reject to open such images. ;-)

  • libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to TIFF_BYTE instead of TIFF_UNDEFINED to comply with the info in the Adobe XMP Specification.

  • Added many checks for integer overflow and for successful space allocations in the different parts of library. Code review completed by Dmitry V. Levin.

  • libtiff/tiffio.h, libtiff/tif_compress.c: Added TIFFGetConfiguredCODECs() function to get the list of configured codecs.

Tools changes

  • tiff2bw: Write ImageWidth/ImageHeight tags to output file, as noted by Gennady Khokhorin.

Contributed software changes

  • No changes.

LZW compression kit changes

  • This one is not longer needed.

Changes in TIFF v3.7.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.1

References

Current Version

v3.7.1 (tag Release-v3-7-1)

Previous Version

v3.7.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • This is mostly bugfix release. Most important fix is the one related to wrong custom tag read/write code.

Software configuration changes

  • autogen.sh: aclocal and autoheader should be executed after libtoolize. Also add -I . to aclocal invocation to check current directory for macros.

  • nmake.opt: Link with the user32.lib in windowed mode. As per bug Remote Sensing bugzilla #697 [no longer available]

  • nmake.opt, makefile.vc: make it easier to rename the libtiff DLL.

  • configure, configure.ac: Added --enable-rpath option to embed linker paths into library binary.

Library changes

Tools changes

  • fax2ps.c: Be able to extract the first page (#0). As per bug Remote Sensing bugzilla #690 [no longer available]

  • tiff2ps.c: Fixed wrong variable data type when read Position tags (Tristan Hill).

  • tiff2ps.c: Fixed wrong variable data type when read Resolution tags (Peter Fales).

  • tiffset.c: Check the malloc() return value (Dmitry V. Levin).

Contributed software changes

  • None.

Changes in TIFF v3.7.2 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.2

References

Current Version

v3.7.2 (tag Release-v3-7-2)

Previous Version

v3.7.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Maintenance release. Many bugfixes in the build environment and compatibility improvements.

Software configuration changes

Library changes

Tools changes

Contributed software changes

  • None.

Changes in TIFF v3.7.3 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.3

References

Current Version

v3.7.3 (tag Release-v3-7-3)

Previous Version

v3.7.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Replace runtime endianness check with the compile time one.

  • Added support for the new predictor type (floating point predictor), defined at the TIFF Technical Note 3.

  • Added Support for custom tags, passed by value.

  • Added support for all DNG tags.

Software configuration changes

Library changes

  • tiffiop.h, tif_open.c: Added open option "h" to avoid reading the first IFD when needed. As per bug Remote Sensing bugzilla #875 [no longer available]

  • tiff.h: Use correct int size on Sparc 64bit/Sun compiler platform. As per bug Remote Sensing bugzilla #855 [no longer available]

  • tif_dirinfo.c: Added support for ClipPath, XClipPathUnits and YClipPathUnits tags.

  • tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c: Make DocumentName, Artist, HostComputer, ImageDescription, Make, Model, Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and TargetPrinter tags custom.

  • tif_jpeg.c: Cleanup the codec state depending on TIFF_CODERSETUP flag (to fix memory leaks).

  • tif_dirwrite.c: Use tdir_count when calling TIFFCvtNativeToIEEEDouble() in the TIFFWriteDoubleArray() function as per bug Remote Sensing bugzilla #845 [no longer available]

  • tif_dirinfo.c, tif_print.c: TIFFFetchByteArray() returns uint16 array when fetching the BYTE and SBYTE fields, so we should consider result as pointer to uint16 array and not as array of char. As per bug Remote Sensing bugzilla #831 [no longer available]

  • tif_dir.c: More efficient custom tags retrieval as per bug Remote Sensing bugzilla #830 [no longer available]

  • tif_win32.c: Use FILE_SHARE_READ | FILE_SHARE_WRITE share mode in CreateFile() call as per bug Remote Sensing bugzilla #829 [no longer available]

  • tif_jpeg.c: Substantial fix for addtiffo problems with JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables in directory.

  • tif_dirread.c: Changed the code that computes stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is zero. This is a common case with GDAL indicating a "null" tile/strip.

  • tif_jpeg.c: added LIB_JPEG_MK1 support in JPEGDecodeRaw().

  • tif_dirread.c: Ensure that broken files with too many values in TIFFFetchPerSampleShorts(), TIFFFetchPerSampleLongs() and TIFFFetchPerSampleAnys() work ok instead of crashing. Remote Sensing bugzilla #843 [no longer available]

  • tif_predict.h, tif_predict.c: Added ability to decode and encode floating point predictor, as per TIFF Technical Note 3. See http://chriscox.org/TIFF_TN3_Draft2.pdf for details.

  • tiffio.h, tiffiop.h, tif_dir.c, tif_read.c, tif_swab.c: Added _TIFFSwab24BitData() and TIFFSwabArrayOfLong() functions used to swap 24-bit floating point values.

  • tiff.h: Added predictor constants.

  • tiffiop.h, tif_dir.c: Use uint32 type for appropriate values in _TIFFVSetField() function. Inspired by the bug Remote Sensing bugzilla #816 [no longer available]

  • tif_open.c: Do not read header in case the output file should be truncated (Ron).

  • tif_dirinfo.c, tif_config.h.vc: Use lfind() instead of bsearch() in _TIFFFindFieldInfoByName() function (Ron).

  • tif_dir.c, tif_print.c: Properly handle all data types in custom tags.

  • dirinfo.c: Added DNG tags.

  • tiff.h: Added missed DNG tag (LensInfo); added DNG 1.1.0.0 tags.

  • tif_dir.c, tif_print.c: Added Support for custom tags, passed by value.

  • tiff.h, tif_dirinfo.c, tiffiop.h: Added EXIF related tags.

Tools changes

Contributed software changes

  • addtiffo/tif_overview.c, addtiffo/tif_ovrcache.c, addtiffo/tif_ovrcache.h: Make overviews working for contiguous images.

Changes in TIFF v3.7.4 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.7.4

References

Current Version

v3.7.4 (tag Release-v3-7-4)

Previous Version

v3.7.3

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Fixed important bug in custom tags handling code.

Software configuration changes

  • Applied patch from Patrick Welche (all scripts moved in the config and m4 directories).

  • SConstruct, libtiff/SConstruct: Added the first very preliminary support for SCons software building tool (http://www.scons.org/). This is experimental infrastructure and it will exist along with the autotools stuff.

  • port/lfind.c: Added lfind() replacement module.

Library changes

  • tif_dir.c: When prefreeing tv->value in TIFFSetFieldV() also set it to NULL to avoid double free when re-setting custom string fields as per: Remote Sensing bugzilla #922 [no longer available]

  • tif_dir.c: Fixed up support for swapping "double complex" values (128 bits as 2 64 bits doubles). GDAL gcore tests now pass on bigendian (macosx) system.

  • libtiff/tif_dirread.c, libtiff/tif_dirinfo.c: Do not upcast BYTE to SHORT in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() instead as per bug Remote Sensing bugzilla #831 [no longer available]

    Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() instead.

  • tif_print.c: Fixed printing of the BYTE and SBYTE arrays.

  • tif_write.c: Do not check the PlanarConfiguration field in the TIFFWriteCheck() function in case of single band images (as per TIFF spec).

  • libtiff/tif_dir.c, libtiff/tif_dir.h, libtiff/tif_dirinfo.c, libtiff/tif_print.c: Make FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera, ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom.

Tools changes

  • tiffcp.c: Fixed WhitePoint tag copying.

Contributed software changes

  • tiffdump.c: Added support for TIFF_IFD datatype.

  • addtiffo/tif_overview.c, addtiffo/tif_ovrcache.c, addtiffo/tif_ovrcache.h: Make overviews working for contiguous images.

Changes in TIFF v3.8.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.8.0

References

Current Version

v3.8.0 (tag Release-v3-8-0)

Previous Version

v3.7.4

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Read-only support for custom directories (e.g. EXIF directory).

  • Preliminary support for MS MDI format.

Software configuration changes

  • Make the default strip size configurable via the --with-default-strip-size and STRIP_SIZE_DEFAULT options.

Library changes

  • tiffio.h: Added VC_EXTRALEAN definition before including windows.h, to reduce the compile time.

  • tif_jpeg.c: Improve compilation under MinGW.

  • tif_aux.c, tif_dir.c, tif_dir.h, tif_dirwrite.c, tif_print.c, tif_getimage.c: Make InkSet, NumberOfInks, DotRange and StoNits tags custom.

  • tif_aux.c, tif_dir.c, tif_dir.h, tif_print.c: Make WhitePoint tag custom.

  • tiffio.h: fixed typo that potentially resulted in redefininition of USE_WIN32_FILEIO

  • tif_dir.c, tif_dir.h, tif_print.c: Make RichTIFFIPTC, Photoshop and ICCProfile tags custom.

  • libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling newer code to get context indicator in error handler and still remain compatible with older code: Done TIFFError() calls everywhere except in tools.

  • tiffinfo.c: Print EXIF directory contents if exist.

  • tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c: Custom directory read-only support.

  • tif_aux.c, tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c, tif_print.c: Make YCbCrCoefficients and ReferenceBlackWhite tags custom.

  • tif_dirread.c: One more workaround for broken StripByteCounts tag. Handle the case when StripByteCounts array filled with completely wrong values.

  • tif_dirinfo.c: Release file descriptor in case of failure in the TIFFOpenW() function as per bug Remote Sensing bugzilla #1003 [no longer available]

  • tif_dirinfo.c: Correctly use bsearch() and lfind() functions as per bug Remote Sensing bugzilla #1008 [no longer available]

  • tif_open.c, tiff.h, tiffdump.c: Incorporate preliminary support for MS MDI format. Remote Sensing bugzilla #1002 [no longer available]

  • libtiff.def, tiffiop.h, tiffio.h: Made TIFFFreeDirectory() public.

  • /tif_dirinfo.c: Make XResolution, YResolution and ResolutionUnit tags modifiable during write process. As per bug Remote Sensing bugzilla #977 [no longer available]

  • if_dirread.c: Don't try and split single strips into "0" strips in ChopUpSingleUncompressedStrip(). This happens in some degenerate cases (like 1×1 files with stripbytecounts==0 (gtsmall.jp2 embed tiff)

  • tif_fax3.c: changed 'at scanline ...' style warning/errors with incorrect use of tif_row, to 'at line ... of strip/tile ...' style.

Tools changes

Contributed software changes

  • contrib/addtiffo/*: Major upgrade by Joris to support subsampled YCbCr images in jpeg compressed TIFF files.

Changes in TIFF v3.8.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.8.1

References

Current Version

v3.8.1 (tag Release-v3-8-1)

Previous Version

v3.8.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Bug-fix release.

Software configuration changes

  • libtool related stuff updated from the 2.1a branch.

  • Fix with_default_strip_size comparison as reported by Norihiko Murase.

Library changes

Tools changes

Contributed software changes

None.

Changes in TIFF v3.8.2 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.8.2

References

Current Version

v3.8.2 (tag Release-v3-8-2)

Previous Version

v3.8.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Bug-fix release.

Software configuration changes

Library changes

Tools changes

Contributed software changes

None.

Changes in TIFF v3.9.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.0

References

Current Version

v3.9.0 (tag Release-v3-9-0)

Previous Version

v3.9.0beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • All of the major changes since 3.8.0 were incorporated in the v3.9.0beta release. This is a stable release from a stable maintenance branch which incorporates many bug and security fixes needed by existing users of 3.X.X series libraries. Any future major changes will be in the 4.0.X series of releases.

Software configuration changes

  • Updated autotools: Autoconf 2.64, Automake 1.11, libtool 2.2.6.

  • Enabled support for Automake silent build rules (--enable-silent-rules or make V=0)

  • Enabled support for Automake colorized tests.

  • Added detection of a 64-bit integer type so that bundled utilities (like tiffcrop) can use it when necessary. Note that this version of libtiff does not require a 64-bit integer type but libtiff 4.0 does.

Library changes

  • libtiff/Makefile.am, libtiff/Makefile.v: Do not distribute tiffconf.h, remove tif_config.h/tiffconf.h during cleaning. As per bug Remote Sensing bugzilla #1573 [no longer available]

  • tif_dirinfo.c: _TIFFMergeFields() now only merges in field definitions that are missing. Existing definitions are silently ignored. (Remote Sensing bugzilla #1585 [no longer available])

  • tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for establishing if an existing tile can be rewritten to the same location by comparing the current size to all the other blocks in the same directory. This is dangerous in many situations and can easily corrupt a file. (observed in esoteric GDAL situation that's hard to document). This change involves leaving the stripbytecount[] values unaltered till TIFFAppendToStrip(). Now we only write a block back to the same location it used to be at if the new data is the same size or smaller - otherwise we move it to the end of file.

  • tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile data when writing the directory just because we have TIFF_BEENWRITING at some point in the past. This was causing odd junk to be written out in a tile of data when a single tile had an interleaving of reading and writing with reading last. (highlighted by gdal autotest/gcore/tif_write.py test 7.)

  • tif_predict.c: use working buffer in PredictorEncodeTile() to avoid modifying callers buffer. GDAL trac #1965

  • tif_predict.c, tif_predict.h, tif_lzw.c, tif_zip.c: Improvements so that predictor based encoding and decoding works in read-write update mode properly. GDAL trac #1948

  • configure.com, libtiff/tif_vms.c: Better OpenVMS support. Patches from Alexey Chupahin.

  • tif_fax3.c: fix leak of FAXCS state (per bug Remote Sensing bugzilla #1603 [no longer available]).

  • tif_fax3.c: Make find0span() and find1span() non-inline to make MSVC 6.0 compiler happy.

  • tif_codec.c: Avoid NULL pointer dereferencing for exotic compression codec codes.

  • tif_dirread.c: zero tif->tif_dir after freeing the directory in TIFFReadCustomDirectory(). I don't exactly remember why this was important.

  • tif_dirwrite.c: Fix potential memory leak writing large double tags.

  • tif_dirread.c: Fix unchecked malloc() result.

  • libtiff/tif_lzw.c: Properly zero out the codetable. As per bug MapTools bugzilla #1929

  • libtiff/tif_lzw.c: Properly zero out the string table. Fixes CVE-2008-2327 security issue.

  • libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 (compatibility with the older versions retained).

  • libtiff/tif_getimage.c, tiffio.h: removed all use of UaToAa and Bitmap16to8 arrays in TIFFRGBAImage structure to restore ABI compatibility. These were just an attempt to speed up processing with precalculated tables. MapTools bugzilla #1979

  • libtiff/tif_codec.c: Avoid printing c->name if it does not exist.

  • libtiff/tif_getimage.c, tiffio.h: More ABI corrections. Removed SubsamplingHor/Ver from TIFFRGBAImage structure. MapTools bugzilla #1980

  • libtiff/tif_jpeg.c: Avoid errors if the application writes a full strip for the last partial strip in a jpeg compressed file. MapTools bugzilla #1981

  • libtiff/tiffio.h: GCC will now validate format specifications for TIFFError(), TIFFErrorExt(), TIFFWarning(), and TIFFWarningExt() in order to reveal bugs. Cleaned up resulting warnings throughout for 32 bit build only.

  • libtiff/tiffiop.h: Add private type declarations for int64, and uint64 so that bundled utilities (like tiffcrop) can use it when necessary.

  • libtiff/tif_predict.c: Add support for 32bit integer horz. predictors. MapTools bugzilla #1911

  • libtiff/tif_luv.c: Fix handling of tiled logluv images. MapTools bugzilla #2005

  • libtiff/tif_write.c: do not override the planar configuration to be contig for one sample files if planar configuration is already set. MapTools bugzilla #2057

  • libtiff/tif_lzw.c: Fix buffer underflow bug. MapTools bugzilla #2065

  • libtiff/tif_luv.c: correct return codes from encoderow to be 1 on success instead of zero. MapTools bugzilla #2069

  • libtiff/tif_print.c (TIFFPrintDirectory()): Applied patch for "tag error may cause segfault in tif_print.c." MapTools bugzilla #1896

Tools changes

  • tools/tiff2pdf.c: Fixed setting of alpha value per report on list.

  • tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() calls when doing the filename/path construction.

  • tools/tiff2pdf.c: More appropriate format string in t2p_write_pdf_string(); avoid signed/unsigned mismatch.

  • tools/tiffsplit.c: Use dynamically allocated array instead of static when constructing output file names.

  • tools/tiffcrop.c, man/tiffcrop.1: Incorporated significant functionality update from Richard Nolde.

  • tools/tiff2ps.c: Incorporated significant functionality update from Richard Nolde. In particular, support for rotating the image by 90, 180, 270, and 'auto' has been added.

  • tools/tiff2ps.c: Remove spurious message printed to stderr.

  • tools/tiffsplit.c: fix sampleformat to be shortv instead of longv.

  • tools/rgb2ycbcr.c, tools/tiff2rgba.c: Applied patch for CVE-2009-2347 libtiff: integer overflows in various inter-color space conversion tools. MapTools bugzilla #2079

Contributed software changes

  • None

Changes in TIFF v3.9.0beta — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.0beta

References

Current Version

v3.9.0beta (tag Release-v3-9-0beta)

Previous Version

v3.8.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • New tiffcrop utility contributed by Richard Nolde. tiffcrop does the same as tiffcp, but also can crop, extract, rotate and mirror images.

  • tif_jbig.c: Added support for JBIG compression scheme (34661 code), contributed by Lee Howard.

  • Totally new implementation of OJPEG module from Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files should be supported now that was not supported previously.

Software configuration changes

  • tif_config.wince.h, tiffconf.wince.h, tif_wince.c: WinCE-specific compatibility stuff from Mateusz Loskot.

  • Rename config.h.vc and tif_config.h.vc to config.vc.h and tif_config.vc.h for easier identification by folks using an IDE.

  • configure, configure.ac: OJPEG support enabled by default (i.e., when conformant JPEG support is enabled).

  • README.vms, Makefile.am, configure.com, libtiff/Makefile.am, libtiff/tif_config.h-vms, libtiff/tif_stream.cxx, libtiff/tif_vms.c, libtiff/tiffconf.h-vms: Added support for OpenVMS by Alexey Chupahin.

  • nmake.opt: use /EHsc for VS2005 compatibility. Also define _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.

Library changes

  • tif_dirinfo.c (_TIFFFindFieldInfo()): Don't attempt to bsearch() on a NULL fieldinfo list. (_TIFFFindFieldInfoByName()): Don't attempt to lfind() on a NULL fieldinfo list.

  • tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it will convert from decompressor to compressor or compress to decompress if required by the force arguments. This works around a problem in where the JPEGFixupTestSubsampling() may cause a decompressor to be setup on a directory when later a compressor is required with the force flag set. Occurs with the addtiffo program for instance.

  • tif_dirwrite.c: Fixed swapping of byte arrays stored in-place in tag offsets as per bug Remote Sensing bugzilla #1363 [no longer available]

  • tif_getimage.c: workaround for "Fractional scanline" error reading OJPEG images with rowsperstrip that is not a multiple of vertical subsampling factor. This bug is mentioned in Remote Sensing bugzilla #1390 [no longer available] and http://www.asmail.be/msg0054766825.html

  • tif_dirread.c: Added special function to handle SubjectDistance EXIF tag as per bug Remote Sensing bugzilla #1362 [no longer available]

  • tif_dirread.c, tif_read.c: Type of the byte counters changed from tsize_t to uint32 to be able to work with data arrays larger than 2GB. Fixes bug Remote Sensing bugzilla #890 [no longer available]. Idea submitted by Matt Hancher.

  • tif_dir.c: Workaround for incorrect TIFFs with ExtraSamples == 999 produced by Corel Draw. As per bug Remote Sensing bugzilla #1490 [no longer available]

  • tif_write.c: TIFFAppendToStrip() - clear sorted flag if we move a strip. Remote Sensing bugzilla #1359 [no longer available]

  • tif_fax3.c: Save the state of printdir codec dependent method.

  • tif_jpeg.c: Save the state of printdir codec dependent method as per bug Remote Sensing bugzilla #1273 [no longer available]

  • tif_win32.c: Fixed problem with offset value manipulation as per bug Remote Sensing bugzilla #1322 [no longer available]

  • tif_fax3.c, tif_next.c, tif_pixarlog.c: Fixed multiple vulnerabilities, as per Gentoo bug (): http://bugs.gentoo.org/show_bug.cgi?id=142383

  • tif_lzw.c, tif_zip.c: Fixed problems with mixing encoding and decoding on the same read-write TIFF handle. The LZW code can now maintain encode and decode state at the same time. The ZIP code will switch back and forth as needed. Remote Sensing bugzilla #757 [no longer available]

  • tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron

  • tif_dirwrite.c: take care not to flush out buffer of strip/tile data in _TIFFWriteDirectory() if TIFF_BEENWRITING not set. Relates to bug report by Peng Gao with black strip at bottom of images.

  • tif_dirwrite.c: make sure to use uint32 for wordcount in TIFFWriteNormalTag() if writecount is VARIABLE2 for ASCII fields. It already seems to have been done for other field types. Needed for tiffset on files with geotiff ascii text.

  • tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961).

  • tif_dirread.c: Move IFD fetching code in the separate function TIFFFetchDirectory() avoiding code duplication in TIFFReadDirectory() and TIFFReadCustomDirectory().

  • tif_readdir.c: Added case in EstimateStripByteCounts() for tiled files. Modified TIFFReadDirectory() to not invoke EstimateStripByteCounts() for case where entry 0 and 1 are unequal but one of them is zero. Remote Sensing bugzilla #1204 [no longer available]

  • tif_open.c, tif_dirread.c, tiffiop.h: Move IFD looping checking code in the separate function TIFFCheckDirOffset().

  • tif_aux.c: Added _TIFFCheckRealloc() function.

  • tif_fax3.c: Fixed problems in fax decoder as per bug Remote Sensing bugzilla #1194 [no longer available]

  • tif_jbig.c: Added support for JBIG compression scheme (34661 code) contributed by Lee Howard. As per bug Remote Sensing bugzilla #896 [no longer available].

  • tif_getimage.c: Added support for planarconfig separate non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]).

  • tif_getimage.c: Revision of all RGB(A) put routines:

    • Conversion of unassociated alpha to associated alpha now done with more performant LUT, and calculation more correct.

    • Conversion of 16bit data to 8bit data now done with more performant LUT, and calculation more correct

    • Bugfix of handling of 16bit RGB with unassociated alpha

  • tif_ojpeg.c: totally new implementation

  • tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling of OJPEG images in favor of tif_getimage.c native handling of YCbCr and desubsampling.

  • tif_jpeg.c: JPEGVSetField() so that altering the photometric interpretation causes the "upsampled" flag to be recomputed. Fixes peculiar bug where photometric flag had to be set before jpegcolormode flag.

Tools changes

Contributed software changes

  • contrib/addtiffo/tif_overview.c: Fix problems with odd sized output blocks in TIFF_DownSample_Subsampled() (Remote Sensing bugzilla #1542 [no longer available]).

  • contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. Though it is still far from the state of being working and useful.

Changes in TIFF v3.9.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.1

References

Current Version

v3.9.1 (tag Release-v3-9-1)

Previous Version

v3.9.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • This is a bug-fix release for several bugs (two of which are dire) which were discovered in the 3.9.0 release.

Software configuration changes

  • Several defines were missing from tif_config.vc.h which are necessary to compile the library using MSVC.

  • Colorized tests were actually not enabled as expected. Parallel tests mode is now also enabled so that tests can be run in parallel, and test output is sent to .log files.

Library changes

  • libtiff/tif_write.c (TIFFAppendToStrip()): Remove cast which caused libtiff to output a wrong last strip with byte-count and strip-offset of zero. This cast was added on the day of the 3.9.0 release.

  • libtiff/tif_dirwrite.c: Back out changes from 2007-11-22 that resulted in the final strip not being written in some circumstances. MapTools bugzilla #2088

Tools changes

None

Contributed software changes

  • None

Changes in TIFF v3.9.2 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.2

References

Current Version

v3.9.2 (tag Release-v3-9-2)

Previous Version

v3.9.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Fixes a number of bugs present in the 3.9.1 release.

  • OJPEG support updated to work with IJG JPEG 7 release.

  • tiffcrop validated for most TIFF storage subformats and sample depths.

Software configuration changes

  • x86_64 now uses the same default fill order as i386.

Library changes

  • Writing tags with an array value of type TIFF_DOUBLE now returns correct error status. The TIFFTAG_SMINSAMPLEVALUE and TIFFTAG_SMAXSAMPLEVALUE tags failed to write without this fix.

  • OJPEG decoder now works with IJG JPEG 7. Resolves "Bug 2090 - OJPEG crash with libjpeg v7". MapTools bugzilla #2090

  • Eliminate most GCC "dereferencing type-punned pointer" warnings.

Tools changes

  • New tiffcrop from Richard Nolde. Major updates to add significant functionality for reading and writing tile based images with bit depths not a multiple of 8 which cannot be handled by tiffcp.

  • Allow building tools with GCC using the -Wformat -Werror=format-security flags.

Contributed software changes

  • None

Changes in TIFF v3.9.3 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.3

References

Current Version

v3.9.3 (tag Release-v3-9-3)

Previous Version

v3.9.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

Software configuration changes

  • libtool is updated to version 2.2.10.

Library changes

  • Fix a couple of issues that trigger failures in some cases when using TIFFReadScanline() with JPEG compressed subsampled ycbcr images. MapTools bugzilla #1936

  • Ensure tile and scanline sizes are reset when moving to new directories. MapTools bugzilla #1936

  • Do not generate a JPEGTables tag when creating the JPEG TIFF as is is not required in order to prevent it from being unused and filled with invalid data. (Leave it to be generated by later activity.) MapTools bugzilla #2135

  • Don't return error on badly-terminated MMR strips. MapTools bugzilla #2029

  • Have TIFFTAG_REFERENCEBLACKWHITE always print 6 floats instead of 2*SamplesPerPixel. MapTools bugzilla #2186

  • Ensure that JPEG quality is always set in JPEGPreEncode(), not just when we want to output local tables. Otherwise the quality used during compression may not be right and might not match the tables in the tables tag. This bug only occurs when seeking between directories in the midst of writing blocks. GDAL trac #3539

  • OJPEG: Report an error and avoid a crash if the input file is so broken that the strip offsets are not defined.

  • Eliminate FAX3 decoder buffer overrun possibility (CVE-2010-1411).

  • Restore ReferenceBlackWhite as a non-custom field. This avoids a multi-thread reentrancy problem as well as fixing output of wrong tag value due to redundant definitions for the same tag in the tiffFieldInfo[] array. Resolves MapTools bugzilla #2185

Tools changes

  • tiff2pdf: Write the JPEG SOI headers into the TIFF strip data rather than skipping them. This fixes the ability to view in Acrobat Reader, Evince, and Ghostscript. MapTools bugzilla #2135

  • ppm2tiff: While case for parsing comment line requires extra parenthesis to work as expected. Reported by Thomas Sinclair.

  • tiffcp: add a new option -x to force merged tiff file PAGENUMBER value in sequence for users who care the page sequence, this will also prevent tiff2pdf from creating pdf file from the merged tiff file with wrong page sequence.

  • tiffcp: Applied Tom Lane's patch to reject YCbCr subsampled data since tiffcp currently doesn't support it. MapTools bugzilla #2097

Contributed software changes

  • None

Changes in TIFF v3.9.4 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.4

References

Current Version

v3.9.4 (tag Release-v3-9-4)

Previous Version

v3.9.3

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Complete the fixes for CVE-2009-2347.

  • tiffcrop now supports custom page sizes.

Software configuration changes

  • None.

Library changes

  • Fixed inadequate validation of the SubjectDistance field.

  • Fixed bad handling of out of order tags definated late by a codec.

  • Avoid re-preparing jpeg tables unnecessarily.

Tools changes

  • tiffcrop: Added an option to allow the user to specify a custom page size on the command line. Fix the case where a page size specified with a fractional part was being coerced to an integer by retyping the variables that define the paper size. Corrected European page size dimensions.

  • tiff2rgba: Completed fixes for "CVE-2009-2347 libtiff: integer overflows in various inter-color space conversion tools". MapTools bugzilla #2079

  • tiff2pdf: Fix assorted bugs in tiff2pdf: missing return in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual size is larger. Also, there are a bunch of places that try to memset() a malloc'd buffer before checking for malloc failure, which would result in core dump if there actually were a failure.

Contributed software changes

  • None

Changes in TIFF v3.9.5 — LibTIFF 4.7.0 documentation

Changes in TIFF v3.9.5

References

Current Version

v3.9.5 (tag Release-v3-9-5)

Previous Version

v3.9.4

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

  • configure.ac: Should use AC_CANONICAL_HOST since host specifies the run-time target whereas target is used to specify the final output target if the package is a build tool (like a compiler), which libtiff is not. Resolves MapTools bugzilla #2307 "Use AC_CANONICAL_HOST macro".

Library changes

  • libtiff/tif_getimage.c: Check the number of samples per pixel when working with YCbCr image in PickContigCase(). As per bug MapTools bugzilla #2216

  • libtiff/tif_dir.c: Set the bogus post-decoding hook when processing TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when we don't need any post-processing. That helps to reset the hook if we previously set this field to some other value and the hook was initialized accordingly. As per bug MapTools bugzilla #2035

  • libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned integer type conversions. As per bug MapTools bugzilla #2207

  • libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag() and _TIFFFieldWithName() if the tag is not found in the tag table. This should be normal situation and returned NULL value should be properly handled by the caller.

  • libtiff/tif_dirwrite.c, tif_print.c: Properly handle DotRange tag as it can be either byte or short size and should be set and read by value, not as an array. As per bug MapTools bugzilla #2116

  • libtiff/tif_dirread.c: Really reset the tag count in CheckDirCount() to expected value as the warning message suggests. As per bug MapTools bugzilla #1963

  • libtiff/tif_open.c: Fix mode check before opening a file. MapTools bugzilla #1906

  • libtiff/tif_jpeg.c, libtiff/tif_strip.c: apply patch for CVE-2010-3087 per bug MapTools bugzilla #2140

  • libtiff/tif_dirread.c: fix crash when reading a badly-constructed TIFF per MapTools bugzilla #1994

  • libtiff/tif_ojpeg.c: fix buffer overflow on problem data MapTools bugzilla #1999

  • libtiff/tif_dirread.c: modify warnings MapTools bugzilla #2016

  • libtiff/tif_jpeg.c: fix use of clumplines calculation MapTools bugzilla #2149

  • libtiff/tif_color.c: prevent crash in handling bad TIFFs resolves CVE-2010-2595, MapTools bugzilla #2208

  • libtiff/tif_dirread.c: fix needless tag ordering warning MapTools bugzilla #2210

  • libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order to improve compatibility with various viewers submitted by e-mail from Dwight Kelly

  • libtiff/tif_strip.c: use TIFFGetFieldDefaulted() instead of TIFFGetField() when we assume that it will succeed MapTools bugzilla #2215

  • libtiff/tif_dirread.c: tolerate some cases where FIELD_COLORMAP is missing MapTools bugzilla #2189

  • libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images caused by commit on 2010-12-14. Submitted by e-mail from Even Rouault

  • libtiff/tif_dirwrite.c: Avoid undefined behaviour when casting from float to unsigned int in TIFFWriteRationalArray() as reported by Kareem Shehata.

  • libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding a move left. Without this, a malicious input file can generate an indefinitely large series of runs without a0 ever reaching the right margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192. This is a modified version of a patch proposed by Drew Yao of Apple Product Security. It adds an unexpected() report, and disallows the equality case, since emitting a run without increasing a0 still allows buffer overrun.

  • libtiff/tif_fax3.h: Fix to last change allowing zero length runs at the start of a scanline---needed for legal cases.

  • libtiff/tif_thunder.c: Correct potential buffer overflow with thunder encoded files with wrong bitspersample set. The libtiff development team would like to thank Marin Barbella and TippingPoint's Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, CVE-2011-1167). MapTools bugzilla #2300

  • libtiff/tiffiop.h: avoid declaring int64/uint64 on AIX with XLC where they are already available. (MapTools bugzilla #2301)

Tools changes

  • tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr subsampled data since tiffcrop currently doesn't support it. Fix JPEG support.

  • tools/tiffcp.c: Initialize buffer arrays with zero to avoid referencing to uninitialized memory in some cases (e.g. when tile size set bigger than the image size).

  • tools/tiff2pdf.c: Better generation of ID field in t2p_write_pdf_trailer(). Get rid of GCC aliasing warnings.

  • tools/tiff2pdf.c: Fixed computation of the tile buffer size when converting JPEG encoded tiles.

  • tools/tiff2pdf.c: Better handling of string fields, use static string buffers instead of dynamically allocated, use strncpy() instead of strcpy(), control the string lengths.

  • tools/tiff2bw.c, tools/thumbnail.c, tools/pal2rgb.c: Fix the count for WhitePoint tag as per bug MapTools bugzilla #2042

  • tools/tiffdump.c: Use PrintData() function instead of PrintByte()/PrintShort()/PrintLong(). Should fix an issue reported at MapTools bugzilla #2116

  • tools/tiffset.c: Properly handle TIFFTAG_PAGENUMBER, TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE which should be set by value.

  • tools/tiffdump.c: Avoid integer overflows computing the buffer size for large directories. As per bug MapTools bugzilla #2218

  • tools/tiff2pdf.c: Fixed ID buffer filling in t2p_write_pdf_trailer(), thanks to Dmitry V. Levin.

  • tools/tiffcrop.c: Patch from Richard Nolde to avoid a potentially unterminated buffer due to using an exceptionally long file name.

  • tools/tiff2ps.c: improvements and enhancements from Richard Nolde with additional command line options for Document Title, Document Creator, and Page Orientation

  • tools/tiffsplit.c: abort when reading a TIFF without a byte-count per MapTools bugzilla #1996

  • tools/tiff2pdf.c: add fill-page option MapTools bugzilla #2051

  • tools/fax2ps.c: replace unsafe tmpfile() with mkstemp() MapTools bugzilla #2118

  • tools/tiff2pdf.c: fix colors for images with RGBA interleaved data MapTools bugzilla #2250

  • tools/tiffcrop.c: new release by Richard Nolde MapTools bugzilla #2004

  • tools/fax2ps.c: be consistent with page-numbering MapTools bugzilla #2225

  • tools/gif2tiff.c: fix buffer overrun MapTools bugzilla #2270

  • tools/fax2ps.c (main()): Use tmpfile() rather than mkstemp() since it is much more portable. Tmpfile is included in ISO/IEC 9899:1990 and the WIN32 CRT.

Contributed software changes

  • None

Changes in TIFF v4.0.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.0

References

Current Version

v4.0.0 (tag Release-v4-0-0)

Previous Version

v3.9.5

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. Please consult the ChangeLog file in the source package for full change details. The following information is located here:

Major changes

BigTIFF support changes:

  • The options parameter in the TIFFOpen() and TIFFClientOpen() funcs has been extended. When creating new files, you can add option 4 to specify you want to create a ClassicTIFF file, though that is the default and the option is not strictly necessary. (As such, old calling code will continue to function and create ClassicTIFF files.) Or you can add option 8 to specify you want to create a BigTIFF file instead. This new option is also reflected in some of the tools we already upgraded. For instance, you can use the -8 option on tiffcp to have tiffcp produce BigTIFF files instead of the default ClassicTIFF. (Whilst an additional option is provided for version selection when creating new files, no such option is necessary when reading TIFF files. LibTiff reads ClassicTIFF and BigTIFF both, and the application does not need to be aware which TIFF version an opened file is.)

  • Although the tag count in BigTIFF is 64bit, we restricted the count in the implementation to a much more reasonable size. This is necessary in current implementation, because all tag data gets read automatically in the IFD reading stage, so if there's half a dozen private tags with multiple gigabytes of data that causes considerable overhead even if the application level is never interested in these tags. Our choice to ignore tags with data longer then a certain sanity value is much needed as things stand. We also recommend to step away from writing tiles that are 8 kilobyte in their uncompressed form, or writing single-line strips, in really big files, resulting in mega's of tiles or strips. It's much more efficient to choose bigger tile or strip sizes, up to several megabyte if needed, and have a few kilo of tiles or strips instead.

  • Although it's rare, some application code does directly access file offsets. Some of these are automatically upgraded because they used the toff_t type, others need to be aware that the datatype changed and need to start using toff_t or uint64. This impacts access to tags like the EXIF IFD tag, for example, or the SubIfds tag, or to StripOffsets or TileOffsets, the return type of functions like TIFFCurrentDirOffset(), and a parameter type to functions like TIFFSetSubDirectory().

  • Although it's rare, some application code does use structures like TIFFHeader or TIFFDirEntry that used to be an exact binary representation of TIFF structures. These need to change. The old TIFFHeader structure is replaced by the new TIFFHeaderClassic, TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact binary representation of the ClassicTIFF and BigTIFF header, and of the part that is common to both. There is no new equivalent for the old TIFFDirEntry structure (or more precisely, there is still a TIFFDirEntry structure, but it is changed, moved to library-private definition, and no longer an exact binary representation of the tag structure of either TIFF version).

  • Sizer functions, like TIFFTileSize() or TIFFScanlineSize() and the like, return a tmsize_t() value (tmsize_t() is defined as int32 on 32bit machines, and int64 on 64bit machines, and as such it is meant to represent signed memory sizes). This is because we figure 98% of the calling code uses the return value as sizes in allocations and the like. So, any overflow that is theoretically possible with BigTIFF when LibTiff is running on a 32bit system, is best detected inside the sizer functions and it is best to return a type that makes sense as a memory size. If your calling code is the exception and is interested in actual file size, you best use the newer TIFFTileSize64() or TIFFScanlineSize64() function that returns an uint64 type.

  • These TIFF tags require a 64-bit type as an argument in libtiff 4.0.0:

    • TIFFTAG_FREEBYTECOUNTS

    • TIFFTAG_FREEOFFSETS

    • TIFFTAG_STRIPBYTECOUNTS

    • TIFFTAG_STRIPOFFSETS

    • TIFFTAG_TILEBYTECOUNTS

    • TIFFTAG_TILEOFFSETS

Other important backward incompatible changes in the public API:

  • TIFFRewriteField() renamed into _TIFFRewriteField() and moved out from the public interface (from tiffio.h to tiffiop.h). Type of its count parameter changed from uint32 to tmsize_t.

  • TIFFMergeFieldInfo() returns non-void result now. It returns 0 if successful and -1 if failed. Though this is now obsoleted function and should not be used in new programs. Use the new tag extension scheme instead.

  • TIFFFieldWithTag() and TIFFFieldWithName() functions now return pointer to TIFFField constant object instead of TIFFFieldInfo.

  • TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration have been removed. They was unused and never been used properly. Should be unneeded for high-level applications.

  • TIFFTagValue structure removed from the public tiffio.h to private tif_dir.h and not accessible anymore. It should be unneeded for high-level applications.

Software configuration changes

Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool 2.4.

  • Enabled support for Automake silent build rules (--enable-silent-rules or make V=0)

  • Enabled support for Automake colorized and parallel tests.

  • Added detection of 64-bit integer types since libtiff 4.0 requires use of 64-bit signed and unsigned integer types.

  • Libtiff now provides a more comprehensive test suite with over 72 tests, which may be executed on Unix-like systems, or under Microsoft Windows using MinGW/MSYS or Cygwin.

  • --disable-lzma configure option to disable use of liblzma.

  • --enable-defer-strile-load configure option to enable experimental deferred strip/tile offset/size loading. May cause some extremely sophisticated uses of libtiff to fail.

  • --enable-chunky-strip-read configure option to enable experimental enable reading large strips in chunks in TIFFReadScanline().

  • Now always uses WIN32 native I/O functions for Microsoft Windows except for under Cygwin.

  • Now provides a pkg-config support file (libtiff-4.pc).

Library changes

  • Patches/fixes made to stable libtiff (v3.9.X) are also applied to 4.0.0. There are too many to list here. See the distribution ChangeLog for a detailed change list.

  • There is considerable change in some files like tif_dirread() and tif_dirwrite(). These changes don't impact backwards compatibility, they are mostly a clean rewrite that does allow BigTIFF support as well as somewhat more robust reading of the unexpected already and will also serve future API extension but does not impact current API or functionality in a negative way that you need to know about.

  • Although there is still a functional definition for types like toff_t (file offset), tstrip_t (strip index number), etc, we recommend against using these in newer code. We have learned that it is next to impossible to use these consistently and make real abstraction of the binary format of these types. Instead, at a certain level we always end up doing casts anyway, and taking the exact binary format into account, so these types are nothing but dangerously misleading and obfuscating. You do not need to update calling code that uses them, as 99.9% of such code will continue to work. But we recommend against using them in newer calling code, and we started replacing them with binary clear types like uint16, uint32 and such in the library.

  • We do use and will continue to use one functional type that is an exception to the above rule, being tmsize_t. This is a signed memory size type, i.e. it is int32 on 32bit machines, or int64 on 64bit machines.

  • Optionally support LZMA compression via TIFF tag 34925. tiffcp supports compression levels similar to -c lzma:p1 or -c zip:p9 for setting the LZMA compression parameters.

  • Optionally defer the load of strip/tile offset and size tags for optimized scanning of directories. Enabled with the --enable-defer-strile-load configure option (DEFER_STRILE_LOAD #define in tif_config.h).

  • Optionally enable experimental support for reading big strips in chunks. Enabled with the --enable-chunky-strip-read configure option.

Tools changes

  • tiffset: add -d and -sd switches to allow operation on a particular directory, not just the first.

Contributed software changes

  • None

Changes in TIFF v4.0.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.1

References

Current Version

v4.0.1 (tag Release-v4-0-1)

Previous Version

v4.0.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

  • --enable-ld-version-script: New configure option to enable shared library symbol versioning on ELF-based systems (e.g. Linux and FreeBSD) which use the GNU linker. This allows multiple major versions of libtiff to be loaded simultaneously into the same application or library without conflict, as long as all libtiffs involved are built with versioned symbols. This option is not enabled by default.

  • Added libtiff private dependency on -llzma for pkg-config.

Library changes

  • libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around assumption tag fetching is always successful.

  • libtiff/tif_jpeg.c: Extra caution for case where sp is NULL.

Tools changes

  • None

Contributed software changes

  • None

Changes in TIFF v4.0.10 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.10

References

Current Version

v4.0.10 (tag v4.0.10)

Previous Version

v4.0.9

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at Gitlab. This is the first release to be made from the new Git repository.

Software configuration changes

  • Minimum CMake version is now v2.8.11 for the CMake-based build.

  • Libwebp will be automatically detected and used by configure/cmake if present.

  • Libzstd will be automatically detected and used by configure/cmake if present.

Library changes

  • Added ZSTD compression codec. Zstandard or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios. It's backed by a very fast entropy stage, provided by Huff0 and FSE library.

    We require libzstd >= 1.0.0 so as to be able to use streaming compression and decompression methods.

    The default compression level we have selected is 9 (range goes from 1 to 22), which experimentally offers equivalent or better compression ratio than the default deflate/ZIP level of 6, and much faster compression.

    For example on a 6600×4400 16bit image, tiffcp -c zip runs in 10.7 seconds, while tiffcp -c zstd runs in 5.3 seconds. Decompression time for zip is 840 ms, and for zstd 650 ms. File size is 42735936 for zip, and 42586822 for zstd. Similar findings on other images.

    On a 25894×16701 16bit image:

    Compressor Relative Performance

    Compressor

    Compression time

    Decompression time

    File size

    ZSTD

    35 s

    3.2 s

    399,700,498

    ZIP/Deflate

    1m 20 s

    4.9 s

    419,622,336

    Please note that COMPRESSION_ZSTD is self-assigned the id 50000 by the libtiff project and is not officially registered with Adobe since Adobe's registration function is defunct.

  • Added WebP compression codec.

    WebP is a high performance compressor intended for photos as commonly used on the Web. The WebP encoder is not designed for huge images, but serves very well for compressing strips and tiles in TIFF as long as the strips or tiles do not exceed the capability of the encoder.

    As a test of compression performance metrics, GraphicsMagick was used on an extremely high quality 8-bit TIFF image from a Hasselblad H4D-200MS camera with pixel dimensions of 16352×12264. The image was re-encoded with 1024×1024 tiles and various compression algorithms, using default settings for each algorithm. Based on this test, the compression and decompression performance (in iterations per second), the resulting file size, and the calculated total PSNR are provided here. It can be seen that WebP provided excellent encode and decode performance, and the compressed file size was very small:

    Compressor Relative Performance

    Compressor

    Compression

    Decompression

    File size

    PSNR

    None

    0.536 iter/s

    1.506 iter/s

    576.03MiB

    LZW

    0.105 iter/s

    0.266 iter/s

    270.68MiB

    ZStd

    0.020 iter/s

    0.518 iter/s

    238.42MiB

    LZMA

    0.009 iter/s

    0.056 iter/s

    247.61MiB

    ZIP

    0.009 iter/s

    0.301 iter/s

    247.88MiB

    JPEG

    0.446 iter/s

    0.760 iter/s

    18.59MiB

    39.00

    WebP

    0.019 iter/s

    0.330 iter/s

    9.38MiB

    37.78

    Please note that COMPRESSION_WEBP is self-assigned the id 50001 by the libtiff project and is not officially registered with Adobe since Adobe's registration function is defunct.

  • TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes Bug 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF image.

  • _TIFFVGetField(): fix heap out-of-bounds access when requesting TIFFTAG_NUMBEROFINKS on a EXIF directory. Fixes Bug 2765 - Heap Out-Of-Bounds Memory Access - 68122422. Reported by Google Autofuzz project.

  • Fix a memory leak in TIFFStreamOpen(). TIFFStreamOpen() allocates a new tiff{o,i}s_data, but if TIFFClientOpen() fails then that struct is leaked.

  • Fix for bug 2772. It is possible to craft a TIFF document where the IFD list is circular, leading to an infinite loop while traversing the chain. The libtiff directory reader has a failsafe that will break out of this loop after reading 65535 directory entries, but it will continue processing, consuming time and resources to process what is essentially a bogus TIFFdocument.

    This change fixes the above behavior by breaking out of processing when a TIFF document has >= 65535 directories and terminating with an error.

  • ChopUpSingleUncompressedStrip(): avoid memory exhaustion (CVE-2017-11613). In ChopUpSingleUncompressedStrip(), if the computed number of strips is big enough and we are in read only mode, validate that the file size is consistent with that number of strips to avoid useless attempts at allocating a lot of memory for the td_stripbytecount and td_stripoffset arrays. Fixes Bug 2724 - memory exhaustion in ChopUpSingleUncompressedStrip.

  • Port code: Add strtol(), strtoll() and strtoull(). Also update strtoul(). All use the same implementation from NetBSD libc.

  • Fix for CVE-2018-7456 "NULL pointer dereference in TIFFPrintDirectory()".

  • TIFFWriteDirectorySec(): avoid assertion. Fixes MapTools bugzilla #Bug 2795 - There is a reachable assertion abort in function TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead to remote denial of attack. (:cve:`2018-10963) <2795>`.

  • LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes MapTools bugzilla #Bug 2780 - A heap-buffer-overflow in function LZWDecodeCompat in libtiff4.0.9 (:cve:`2018-8905) <2780>`. The fix consists in using the similar code as LZWDecode() to validate we don't write outside of the output buffer.

  • Remove builtin support for GUI warning and error message boxes. Now warnings always go to the console by default unless applications define their own warning and error handlers.

    GUI applications (and Windows CE) are required to define such handlers.

  • Add tag and pseudo-tag definitions for ESRI LERC codec (out of tree codec whose source is at https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c.

  • Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API Fixes Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode.

  • TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit systems with large number of strips. Probably relates to MapTools bugzilla #Bug 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c (:cve:`2018-10779) <2788>`.

  • Fix out-of-bound read on some tiled images.

  • Avoid potential int32 overflows in multiply_ms().

  • Only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4.

  • JBIG: fix potential out-of-bounds write in JBIGDecode(). Also fix a (harmless) potential use of uninitialized memory when tif->tif_rawsize > tif->tif_rawcc. In case libtiff is compiled with CHUNKY_STRIP_READ_SUPPORT, make sure that whole strip data is provided to JBIGDecode().

  • LZMAPreEncode(): emit verbose error if lzma_stream_encoder() fails (typically because not enough memory available)

Tools changes

Contributed software changes

None

Changes in TIFF v4.0.2 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.2

References

Current Version

v4.0.2 (tag Release-v4-0-2)

Previous Version

v4.0.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here

Major changes

  • None

Software configuration changes

  • None

Library changes

  • tif_getimage.c: added support for _SEPARATED CMYK images.

  • tif_getimage.c: Added support for greyscale + alpha.

  • Added TIFFCreateCustomDirectory() and TIFFCreateEXIFDirectory functions.

  • tif_print.c: Lots of fixes around printing corrupt or hostile input.

  • Improve handling of corrupt ycbcrsubsampling values.

  • tif_unix.c: use strerror() to get meaningful error messages.

  • tif_jpeg.c: fix serious bugs in JPEGDecodeRaw().

  • tif_jpeg.c: Fix size overflow (zdi-can-1221, CVE-2012-1173).

Tools changes

  • tiff2pdf: Defend against integer overflows while calculating required buffer sizes (CVE-2012-2113).

Contributed software changes

  • None

Changes in TIFF v4.0.3 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.3

References

Current Version

v4.0.3 (tag Release-v4-0-3)

Previous Version

v4.0.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

  • Updated to use Automake 1.12.4. Avoids security problem with make distcheck (CVE-2012-3386).

Library changes

Tools changes

  • tiff2pdf: Fail when TIFFSetDirectory() fails. This prevents core dumps or perhaps even arbitrary code execution when processing a corrupt input file (CVE-2012-3401).

  • tiff2pdf: Fix two places where t2p_error didn't get set after a malloc() failure. No crash risk AFAICS, but the program might not report exit code 1 as desired.

Contributed software changes

  • None

Changes in TIFF v4.0.4 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.4

References

Current Version

v4.0.4 (tag Release-v4-0-4)

Previous Version

v4.0.4beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

Library changes

  • TIFFNumberOfDirectories(): Coverity 1134470 "Logically dead code"

  • tif_dirread.c:

    • TIFFReadDirEntryDoubleArray(): Coverity 298626 "Logically dead code".

    • TIFFReadDirEntryFloatArray(): Coverity 298627 "Logically dead code".

    • TIFFReadDirEntryIfd8Array(): Coverity 298628 "Logically dead code".

    • TIFFReadDirEntrySlong8Array(): Coverity 298629 "Logically dead code"

  • tif_dirwrite.c

  • tif_jpeg.c

    • JPEGCleanup(): Coverity 298624 "Dereference before null check".

    • JPEGDecode(): Coverity 602597 "Operands don't affect result".

  • tif_getimage.c

  • tif_luv.c

    • LogLuvDecodeStrip(): Coverity 991239 "Division or modulo by zero".

    • LogLuvDecodeTile(): Coverity 991227 "Division or modulo by zero".

    • LogLuvEncodeStrip(): Coverity 991240 "Division or modulo by zero".

    • LogLuvEncodeTile(): Coverity 991241 "Division or modulo by zero".

  • tif_lzw.c

    • Decode files that contain consecutive CODE_CLEAR codes.

  • tif_ojpeg.c

    • OJPEGReadBufferFill(): Coverity 603400 "Missing break in switch".

    • OJPEGReadHeaderInfoSecStreamDht(): Coverity 601720 "Resource leak".

  • tif_read.c

    • TIFFStartTile(): Coverity 715973 and 715974 "Division or modulo by zero".

  • tif_unix.c

  • tif_write

Tools changes

  • bmp2tiff

    • Coverity 1024225 "Untrusted value as argument".

    • Coverity 1024678 "Unchecked return value from library".

    • Coverity 1024679 "Unchecked return value from library".

    • Coverity 1214160 "Ignoring number of bytes read".

  • gif2tiff

    • Coverity 1024222 "Untrusted value as argument".

    • Coverity 1024890 "Ignoring number of bytes read".

    • Coverity 1024891 "Ignoring number of bytes read".

    • Coverity 1024892 "Ignoring number of bytes read".

    • Coverity 1024893 "Ignoring number of bytes read".

    • Coverity 1024894 "Ignoring number of bytes read".

  • ras2tiff

    • Corrected Sun Raster header definition to be safe for 64-bit systems. Add some header validations. Fixes many (unspecified) Coverity issues.

    • Coverity 1024223 "Untrusted value as argument".

    • Coverity 1301206: "Integer handling issues (BAD_SHIFT)".

  • raw2tiff

    • Coverity 1024887 "Unchecked return value from library".

    • Coverity 1024888 "Unchecked return value from library".

    • Coverity 1024889 "Unchecked return value from library".

    • Coverity 1214162 "Ignoring number of bytes read".

  • tiff2pdf

    • MapTools bugzilla #2078: Suppress initial output of the header.

    • MapTools bugzilla #2150: Change ColorTransform from "0" to "1".

    • Take care in using the return value from snprintf().

    • Coverity 1024181 "Structurally dead code".

    • Coverity 1024181 "Structurally dead code".

    • Coverity 1227690 "Unused value".

    • Coverity 298621 "Resource leak".

  • tiff2ps

    • Correct sizing and scaling problems with output document.

  • tiffcp

    • Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak".

  • tiffcrop

    • Correctly copy the compression tag from the source TIFF.

    • Coverity 1024545 "Division or modulo by zero".

    • Coverity 1024586 "Logically dead code".

    • Coverity 1024796 "Nesting level does not match indentation".

    • Coverity 1024797 "Nesting level does not match indentation".

    • Coverity 1294542 "Logical vs. bitwise operator".

    • Coverity 1299740 "Out-of-bounds write".

    • Coverity 1299741 "Dereference before null check".

  • tiffdither

    • Check memory allocations for failure. Also check multiplication overflow. (Fixes #2501, CVE-2014-8128)

  • tiffgt.c

  • tiffmedian

    • Coverity 1024386 "Out-of-bounds read".

    • Coverity 1024386 "Out-of-bounds read".

    • Coverity 1024795 "Nesting level does not match indentation".

    • Coverity 1024795 "Nesting level does not match indentation".

tiffsplit

  • Coverity 1024304 "Resource leak".

  • Coverity 1024305 "Resource leak".

Contributed software changes

  • addtiffo

    • Check buffer size calculation for overflow.

    • Coverity 298615 "Resource leak".

    • Coverity 1024649 "Unintended sign extension".

  • iptcutil

    • Coverity 1024468 "Infinite loop".

    • Coverity 1024727 "Truncated stdio return value".

    • Coverity 1214240 "Untrusted loop bound".

Changes in TIFF v4.0.4beta — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.4beta

References

Current Version

v4.0.4beta (tag Release-v4-0-4beta)

Previous Version

v4.0.3

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

  • Updated to use Automake 1.15 and Libtool 2.4.5

Library changes

  • TIFFCheckDirOffset(): avoid uint16 overflow when reading more than 65535 directories, and effectively error out when reaching that limit.

  • TIFFNumberOfDirectories(): generate error in case of directory count overflow.

  • TIFFAdvanceDirectory(): If nextdir is found to be defective, then set it to zero before returning error in order to terminate processing of truncated TIFF.

  • JPEG-in-TIFF: recognize SOF2, SOF9 and SOF10 markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. Note: the default settings of mozjpeg will produce progressive scans, which is forbidden by the TechNote.

  • JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused all tiles/strips to include quantization tables even when the jpegtablesmode had the JPEGTABLESMODE_QUANT bit set. Also add explicit removal of Huffman tables when jpegtablesmode has the JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the first tile/strip (only useful in update scenarios. create-only was fine)

  • JPEG-in-TIFF: fix segfault in JPEGFixupTagsSubsampling() on corrupted image where tif->tif_dir.td_stripoffset == NULL. (MapTools bugzilla #2471)

  • NeXT codec: add new tests to check that we don't read outside of the compressed input stream buffer.

  • NeXT codec: check that BitsPerSample = 2. Fixes MapTools bugzilla #2487 (CVE-2014-8129)

  • NeXT codec: in the "run mode", use tilewidth for tiled images instead of imagewidth to avoid crash

  • tif_getimage.c: in OJPEG case, fix checks on strile width/height in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and putcontig8bitYCbCr21tile cases.

  • in TIFFDefaultDirectory(), reset any already existing extended tags installed by user code through the extender mechaninm before calling the extender callback (GDAL #5054)

  • Fix warnings about unused parameters.

  • Fix various typos in comments found by Debian lintian tool (GDAL #5756)

  • tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. (MapTools bugzilla #2235)

  • tif_dirread.c: In EstimateStripByteCounts(), check return code of _TIFFFillStriles(). This solves crashing bug on corrupted images generated by afl.

  • tif_read.c: fix several invalid comparisons of a uint64 value with <= 0 by casting it to int64 first. This solves crashing bug on corrupted images generated by afl.

  • TIFFSetField(): refuse to set negative values for TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing the directory

  • TIFFReadDirectory(): refuse to read ColorMap or TransferFunction if BitsPerSample has not yet been read, otherwise reading it later will cause user code to crash if BitsPerSample > 1

  • TIFFRGBAImageOK(): return FALSE if LOGLUV with SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8

  • tif_config.vc.h: no longer use #define snprintf _snprintf with

    Visual Studio 2015 aka VC 14 aka MSVC 1900

  • LZW codec: prevent potential null dereference of sp->dec_codetab in LZWPreDecode() (MapTools bugzilla #2459)

  • TIFFReadBufferSetup(): avoid passing -1 size to TIFFmalloc() if passed user buffer size is 0 (MapTools bugzilla #2459)

  • TIFFReadDirEntryOutputErr(): Incorrect count for tag should be a warning rather than an error since errors terminate processing.

  • tif_dirinfo.c (TIFFField) : Fix data type for TIFFTAG_GLOBALPARAMETERSIFD tag.

  • Add definitions for TIFF/EP CFARepeatPatternDim and CFAPattern tags (MapTools bugzilla #2457)

  • tif_codec.c, tif_dirinfo.c: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of sprintf(buf, ...) in favor of using snprintf(buf, sizeof(buf), ...)

  • configure.ac: Improve pkg-config static linking by adding -lm to Libs.private when needed.

  • tif_write.c: tmsize_t related casting warning fixed for 64bit linux.

  • tif_read.c: uint64/tmsize_t change for MSVC warnings. (MapTools bugzilla #2427)

  • Fix TIFFPrintDirectory() handling of field_passcount fields: it had the TIFF_VARIABLE and TIFF_VARIABLE2 cases backwards.

  • PixarLog codec: Improve previous patch for CVE-2012-4447 (to enlarge tbuf for possible partial stride at end) so that overflow in the integer addition is detected.

  • tif_unix,vms,win32.c (_TIFFmalloc()): ANSI C does not require malloc() to return NULL pointer if requested allocation size is zero. Assure that _TIFFmalloc() does.

  • tif_zip.c: Avoid crash on NULL error messages.

Tools changes

  • tiff2pdf Fix various crashes and memory buffer access errors (oCERT-2014-013).

  • tiff2pdf fix buffer overflow on some YCbCr JPEG compressed images. (MapTools bugzilla #2445)

  • tiff2pdf fix buffer overflow on YCbCr JPEG compressed image. (MapTools bugzilla #2443)

  • tiff2pdf check return code of TIFFGetField() when reading TIFFTAG_SAMPLESPERPIXEL

  • tiff2pdf fix crash due to invalid tile count.

  • tiff2pdf Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB

  • tiff2pdf Assure that memory size calculations for _TIFFmalloc() do not overflow the range of tmsize_t.

  • tiff2pdf Avoid crash when TIFFTAG_TRANSFERFUNCTION tag returns one channel, with the other two channels set to NULL.

  • tiff2pdf close PDF file. (MapTools bugzilla #2479)

  • tiff2pdf Preserve input file directory order when pages are tagged with the same page number.

  • tiff2pdf.c terminate after failure of allocating ycbcr buffer (MapTools bugzilla #2449, CVE-2013-4232)

  • tiff2pdf Rewrite JPEG marker parsing in t2p_process_jpeg_strip() to be at least marginally competent. The approach is still fundamentally flawed, but at least now it won't stomp all over memory when given bogus input. Fixes CVE-2013-1960.

  • tiffdump Guard against arithmetic overflow when calculating allocation buffer sizes.

  • tiffdump fix crash due to overflow of entry count.

  • tiffdump Fix double-free bug.

  • tiffdump detect cycle in TIFF directory chaining. (MapTools bugzilla #2463)

  • tiffdump avoid passing a NULL pointer to read() if seek() failed before. (MapTools bugzilla #2459)

  • tiff2bw when Photometric = RGB, the utility only works if SamplesPerPixel = 3. Enforce that. (:bugzilla:2485`, CVE-2014-8127)

  • pal2rgb, thumbnail: fix crash by disabling TIFFTAG_INKNAMES copying. (MapTools bugzilla ##2484, CVE-2014-8127)

  • thumbnail fix out-of-buffer write. (MapTools bugzilla #2489, CVE-2014-8128)

  • thumbnail, tiffcmp: only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4. (MapTools bugzilla #2493, CVE-2014-8128)

  • tiffcp fix crash when converting YCbCr JPEG-compressed to none. (MapTools bugzilla #2480)

  • bmp2tiff fix crash due to int overflow related to input BMP dimensions

  • tiffcrop fix crash due to invalid TileWidth/TileHeight

  • tiffcrop fix segfault if bad value passed to -Z option (MapTools bugzilla #2459) and add missing va_end in dump_info()

  • thumbnail, tiffcrop: "fix" heap read over-run found with Valgrind and Address Sanitizer on test suite

  • fax2ps check malloc()/realloc() result. (MapTools bugzilla #2470)

  • gif2tiff apply patch for CVE-2013-4243. (MapTools bugzilla #2451)

  • gif2tiff fix possible OOB write. (MapTools bugzilla #2452, CVE-2013-4244)

  • gif2tiff Be more careful about corrupt or hostile input files (MapTools bugzilla #2450, CVE-2013-4231)

  • tiff2rgba fix usage message in that zip was wrongly described

  • tiffinfo Default various values fetched with TIFFGetField() to avoid being uninitialized.

  • tiff2ps Fix bug in auto rotate option code.

  • ppm2tiff avoid zero size buffer vulnerability (CVE-2012-4564). check the linebytes calculation too, get the max() calculation straight, avoid redundant error messages, check for malloc() failure.

  • tiffset now supports a -u option to unset a tag.

    (MapTools bugzilla #2419)

  • Fix warnings about unused parameters.

  • rgb2ycbcr, tiff2bw, tiff2pdf, tiff2ps, tiffcrop, tiffdither: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of sprintf(buf, ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to protect against overflow of fixed-size buffers. This responds in particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's t2p_write_pdf_page().

  • html/man/tiff2ps.1.html, html/man/tiffcp.1.html, html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1, man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c, tools/tiffdither.c: Sync tool usage printouts and man pages with reality

Contributed software changes

  • Fix warnings about variables set but not used.

  • contrib/dbs/xtiff/xtiff.c: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of sprintf(buf, ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to protect against overflow of fixed-size buffers.

Changes in TIFF v4.0.5 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.5

References

Current Version

v4.0.5 (tag Release-v4-0-5)

Previous Version

v4.0.4

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Support for configure/build using CMake.

  • Support for large (> 2GB) files under Microsoft Windows.

Software configuration changes

  • CMakeLists.txt / CMake

    • Configuration and building using CMake is now supported under Microsoft Windows and on Unix-type systems.

  • configure.ac / configure

    • Test for and use fseeko() if it is available. This allows supporting large files on Unix-type systems with a 32-bit long type and a 64-bit off_t type.

Library changes

  • tiffiop.h:

    • Macros added to use 64-bit equivalents for all standard I/O and POSIX APIs used by libtiff and its tools which are limited to 2GB in Windows builds. Note that these 64-bit equivalents were introduced by the CRT provided with Visual Studio 2005 and if the necessary CRT is not installed on the target computer, the program will not run. The wrapper macros will not be activated unless the definition _MSC_VER is at least 1400 or :c:macro:__MSVCRT_VERSION__ is at least 0x800.

  • tif_unix.c:

    • Updated to support large files under Microsoft Windows. This makes tif_unix.c a completely viable candidate for use under Windows (in spite of its name) if the CRT is modern enough. Please note that tif_win32.c already supported large files, but only tiffinfo and tiffdump made any provision to support large files under Windows.

    • _tiffReadProc() and _tiffWriteProc() are modified to chunk I/O to a maximum size of 2GB for extremely large I/O requests. This surmounts limitations in the Microsoft Windows read() and write() APIs (which are limited to the range of a 32-bit int), and may avoid poor behavior with extremely large I/O requests on other systems.

Tools changes

  • All tools

    • Updated to use I/O wrapper macros from tiffiop.h in order to support large files under Microsoft Windows.

Contributed software changes

None

Changes in TIFF v4.0.6 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.6

References

Current Version

v4.0.6 (tag Release-v4-0-6)

Previous Version

v4.0.5

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • Now builds with CMake 2.8.9 and newer (previously required 3.0.0)

Software configuration changes

  • CMakeLists.txt / CMake

    • Supports CMake 2.8.9 and later.

    • Add missing file which wasn't being distributed, causing unit tests to fail.

    • Make shared/static library building configurable.

    • CMake reads all version information directly from configure.ac to avoid duplication of values.

    • CMake builds are now included in distcheck target.

  • Makefile.am

    • Autotools make distcheck now tests the CMake-based build if CMake is available.

Library changes

  • Fixes to avoid undefined behaviour of signed types (C standard compliance).

  • Fixes to avoid possible isses when casting to unsigned char.

  • Fixes to avoid undefined behaviour with shifts.

  • Fix generation of output with 16 bit or 32 bit integer, when byte swapping is needed, in horizontal predictor (MapTools bugzilla #2521).

  • Fix decoding when there is a single pixel to decode (unlikely case...) and byte swapping is involved.

  • Add add explicit masking with 0xff before casting to uchar in floating-point horizontal differencing and accumulation routines.

  • Eliminate requirement for and use of 64-bit constant values.

Tools changes

  • tiffgt

    • Silence glut API deprecation warnings on MacOS X.

  • fax2ps

    • Detect failure to write to temporary file.

Contributed software changes

None

Changes in TIFF v4.0.7 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.7

References

Current Version

v4.0.7 (tag Release-v4-0-7)

Previous Version

v4.0.6

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • The libtiff tools bmp2tiff, gif2tiff, ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from the distribution. these tools were written in the late 1980s and early 1990s for test and demonstration purposes. In some cases the tools were never updated to support updates to the file format, or the file formats are now rarely used. In all cases these tools increased the libtiff security and maintenance exposure beyond the value offered by the tool.

Software configuration changes

  • None

Library changes

  • libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not dereference NULL pointer when values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII access are 0-byte arrays. Fixes MapTools bugzilla #2593 (regression introduced by previous fix done on 2016-11-11 for CVE-2016-9297). Reported by Henri Salo. Assigned as CVE-2016-9448

  • libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() when requesting Predictor tag and that the zip/lzw codec is not configured. Fixes MapTools bugzilla #2591

  • libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure that values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII access are NULL terminated, to avoid potential read outside buffer in _TIFFPrintField(). Fixes MapTools bugzilla #2590

  • libtiff/tif_dirread.c: reject images with OJPEG compression that have no TileOffsets/StripOffsets tag, when OJPEG compression is disabled. Prevent NULL pointer dereference in TIFFReadRawStrip1() and other functions that expect td_stripbytecount to be non NULL. Fixes MapTools bugzilla #2585

  • libtiff/tif_strip.c: make TIFFNumberOfStrips() return the td->td_nstrips value when it is non-zero, instead of recomputing it. This is needed in TIFF_STRIPCHOP mode where td_nstrips is modified. Fixes a read outsize of array in tiffsplit (or other utilities using TIFFNumberOfStrips()). Fixes MapTools bugzilla #2587 (CVE-2016-9273)

  • libtiff/tif_predict.h, libtiff/tif_predict.c: Replace assertions by runtime checks to avoid assertions in debug mode, or buffer overflows in release mode. Can happen when dealing with unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations

  • libtiff/tif_dir.c: discard values of SMinSampleValue and SMaxSampleValue when they have been read and the value of SamplesPerPixel is changed afterwards (like when reading a OJPEG compressed image with a missing SamplesPerPixel tag, and whose photometric is RGB or YCbCr, forcing SamplesPerPixel being 3). Otherwise when rewriting the directory (for example with tiffset, we will expect 3 values whereas the array had been allocated with just one), thus causing a out of bound read access. Fixes MapTools bugzilla #2500 (CVE-2014-8127, duplicate: CVE-2016-3658)

  • libtiff/tif_dirwrite.c: avoid NULL pointer dereference on td_stripoffset when writing directory, if FIELD_STRIPOFFSETS was artificially set for a hack case in OJPEG case. Fixes MapTools bugzilla #2500 (CVE-2014-8127, duplicate: CVE-2016-3658)

  • libtiff/tif_getimage.c (TIFFRGBAImageOK()): Reject attempts to read floating point images.

  • libtiff/tif_predict.c (PredictorSetup()): Enforce bits-per-sample requirements of floating point predictor (3). Fixes CVE-2016-3622 "Divide By Zero in the tiff2rgba tool."

  • libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities in heap allocated buffers. Reported as MSVR 35094. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • libtiff/tif_write.c: fix issue in error code path of TIFFFlushData1() that didn't reset the tif_rawcc and tif_rawcp members. I'm not completely sure if that could happen in practice outside of the odd behaviour of t2p_seekproc() of tiff2pdf). The report points that a better fix could be to check the return value of TIFFFlushData1() in places where it isn't done currently, but it seems this patch is enough. Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations team.

  • libtiff/tif_pixarlog.c: Fix write buffer overflow in PixarLogEncode() if more input samples are provided than expected by PixarLogSetupEncode(). Idea based on libtiff-CVE-2016-3990.patch from libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with different and simpler check. (MapTools bugzilla #2544)

  • libtiff/tif_read.c: Fix out-of-bounds read on memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1() when stripoffset is beyond tmsize_t max value (reported by Mathias Svensson)

  • libtiff/tif_read.c: make TIFFReadEncodedStrip() and TIFFReadEncodedTile() directly use user provided buffer when no compression (and other conditions) to save a memcpy()

  • libtiff/tif_write.c: make TIFFWriteEncodedStrip() and TIFFWriteEncodedTile() directly use user provided buffer when no compression to save a memcpy().

  • libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid potential invalid memory write on corrupted/unexpected images when using the TIFFRGBAImageBegin() interface (reported by Clay Wood)

  • libtiff/tif_pixarlog.c: fix potential buffer write overrun in PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson) (CVE-2016-5875)

  • libtiff/libtiff.def: Added _TIFFMultiply32 and _TIFFMultiply64 to libtiff.def

  • libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the HAVE_SNPRINTF definition.

  • libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by Edward Lam to define HAVE_SNPRINTF for Visual Studio 2015.

  • libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD, fix regression, introduced on 2014-12-23, when reading a one-strip file without a StripByteCounts tag. GDAL #6490

  • libtiff/*: upstream typo fixes (mostly contributed by Kurt Schwehr) coming from GDAL internal libtiff

  • libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt structure a uint16 to reduce size of the binary.

  • libtiff/tif_read.c, tif_dirread.c: fix indentation issues raised by GCC 6 -Wmisleading-indentation

  • libtiff/tif_pixarlog.c: avoid zlib error messages to pass a NULL string to %s formatter, which is undefined behaviour in sprintf().

  • libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif (MapTools bugzilla #2508)

  • libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert() by regular if checks (MapTools bugzilla #2522). Fix potential out-of-bound reads in case of short input data.

  • libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage interface in case of unsupported values of SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and CVE-2015-8683 reported by zzf of Alibaba.

  • libtiff/tif_dirread.c: workaround false positive warning of Clang Static Analyzer about NULL pointer dereference in TIFFCheckDirOffset().

  • libtiff/tif_fax3.c: remove dead assignment in Fax3PutEOLgdal(). Found by Clang Static Analyzer

  • libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory offsets on a even offset (affects BigTIFF). This was a regression of the changeset of 2015-10-19.

  • libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile() should return -1 in case of failure of tif_encodestrip() as documented

  • libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in case of failure so that the above mentioned functions detect the error.

  • libtiff/*.c: fix MSVC warnings related to cast shortening and assignment within conditional expression

  • libtiff/*.c: fix clang -Wshorten-64-to-32 warnings

  • libtiff/tif_dirread.c: prevent reading ColorMap or TransferFunction if BitsPerPixel > 24, so as to avoid huge memory allocation and file read attempts

  • libtiff/tif_dirread.c: remove duplicated assignment (reported by Clang static analyzer)

  • libtiff/tif_dir.c, libtiff/tif_dirinfo.c, libtiff/tif_compress.c, libtiff/tif_jpeg_12.c: suppress warnings about 'no previous declaration/prototype'

  • libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants by U to fix 'warning: negative integer implicitly converted to unsigned type' warning (part of -Wconversion)

  • libtiff/tif_dir.c, libtiff/tif_dirread.c, libtiff/tif_getimage.c, libtiff/tif_print.c: fix -Wshadow warnings (only in libtiff/)

Tools changes

  • tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff, ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from the distribution. The libtiff tools rgb2ycbcr and thumbnail are only built in the build tree for testing. Old files are put in new archive subdirectory of the source repository, but not in distribution archives. These changes are made in order to lessen the maintenance burden.

  • tools/tiff2pdf.c: avoid undefined behaviour related to overlapping of source and destination buffer in memcpy() call in t2p_sample_rgbaa_to_rgb() Fixes MapTools bugzilla #2577

  • tools/tiff2pdf.c: fix potential integer overflows on 32 bit builds in t2p_read_tiff_size() Fixes MapTools bugzilla #2576

  • tools/fax2tiff.c: fix segfault when specifying -r without argument. Patch by Yuriy M. Kaminskiy. Fixes MapTools bugzilla #2572

  • tools/tiffinfo.c: fix out-of-bound read on some tiled images. (MapTools bugzilla #2517)

  • tools/tiffcrop.c: fix multiple uint32 overflows in writeBufferToSeparateStrips(), writeBufferToContigTiles() and writeBufferToSeparateTiles() that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes MapTools bugzilla #2592

  • tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG compressed images. Reported by Tyler Bohan of Cisco Talos as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2 extra uninitialized bytes to the file stream.

  • tools/tiffcp.c: fix out-of-bounds write on tiled images with odd tile width vs image width. Reported as MSVR 35103 by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • tools/tiff2pdf.c: fix read -largely- outsize of buffer in t2p_readwrite_pdf_image_tile(), causing crash, when reading a JPEG compressed image with TIFFTAG_JPEGTABLES length being one. Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • tools/tiffcp.c: fix read of undefined variable in case of missing required tags. Found on test case of MSVR 35100.

  • tools/tiffcrop.c: fix read of undefined buffer in readContigStripsIntoBuffer() due to uint16 overflow. Probably not a security issue but I can be wrong. Reported as MSVR 35100 by Axel Souchet from the MSRC Vulnerabilities & Mitigations team.

  • tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities in heap or stack allocated buffers. Reported as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in heap allocate buffer in t2p_process_jpeg_strip(). Reported as MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • tools/tiff2bw.c: fix weight computation that could result of color value overflow (no security implication). Fix MapTools bugzilla #2550. Patch by Frank Freudenberg.

  • tools/rgb2ycbcr.c: validate values of -v and -h parameters to avoid potential divide by zero. Fixes CVE-2016-3623 (MapTools bugzilla #2569)

  • tools/tiffcrop.c: Fix out-of-bounds write in loadImage(). From patch libtiff-CVE-2016-3991.patch from libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (MapTools bugzilla #2543)

  • tools/tiff2rgba.c: Fix integer overflow in size of allocated buffer, when -b mode is enabled, that could result in out-of-bounds write. Based initially on patch tiff-CVE-2016-3945.patch from libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, with correction for invalid tests that rejected valid files. (MapTools bugzilla #2545)

  • tools/tiffcrop.c: Avoid access outside of stack allocated array on a tiled separate TIFF with more than 8 samples per pixel. Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 (CVE-2016-5321 / CVE-2016-5323 , MapTools bugzilla #2558 / MapTools bugzilla #2559)

  • tools/tiffdump.c: fix a few misaligned 64-bit reads warned by -fsanitize

  • tools/tiffdump.c (ReadDirectory()): Remove uint32 cast to _TIFFmalloc() argument which resulted in Coverity report. Added more mutiplication overflow checks.

Contributed software changes

None

Changes in TIFF v4.0.8 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.8

References

Current Version

v4.0.8 (tag Release-v4-0-8)

Previous Version

v4.0.7

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

  • None

Library changes

  • libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis to fix cppcheck clarifyCalculation warnings

  • libtiff/tif_predict.c, libtiff/tif_print.c: fix printf unsigned vs signed formatting (cppcheck invalidPrintfArgType_uint warnings)

  • libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in TIFFReadEncodedStrip() that caused an integer division by zero. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2596

  • libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ColorMap, TransferFunction attached and nasty plays with bitspersample. The fix for LUV has not been tested, but suffers from the same kind of issue of PixarLog. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2604

  • libtiff/tif_strip.c: revert the change in TIFFNumberOfStrips() done for MapTools bugzilla #2587 / CVE-2016-9273 since the above change is a better fix that makes it unnecessary.

  • libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to instantiate compute nstrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a logic based on the total size of data. Which is faulty is the total size of data is not sufficient to fill the whole image, and thus results in reading outside of the StripByCounts/StripOffsets arrays when using TIFFReadScanline(). Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2608.

  • libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2611

  • libtiff/tif_write.c: fix misleading indentation as warned by GCC.

  • libtiff/tif_fax3.h: revert change done on 2016-01-09 that made Param member of TIFFFaxTabEnt structure a uint16 to reduce size of the binary. It happens that the Hylafax software uses the tables that follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, TIFFFaxBlackTable), although they are not in a public libtiff header. Raised by Lee Howard. Fixes MapTools bugzilla #2636

  • libtiff/tiffio.h, libtiff/tif_getimage.c: add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() variants of the functions without ext, with an extra argument to control the stop_on_error behaviour.

  • libtiff/tif_getimage.c: fix potential memory leaks in error code path of TIFFRGBAImageBegin(). Fixes MapTools bugzilla #2627

  • libtiff/tif_jpeg.c: increase libjpeg max memory usable to 10 MB instead of libjpeg 1MB default. This helps when creating files with "big" tile, without using libjpeg temporary files. Related to https://trac.osgeo.org/gdal/ticket/6757

  • libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes MapTools bugzilla #2653

  • libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational(), replace assertion by runtime check to error out if passed value is strictly negative. Fixes MapTools bugzilla #2535

  • libtiff/tif_dirread.c: avoid division by floating point 0 in TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), and return 0 in that case (instead of infinity as before presumably) Apparently some sanitizers do not like those divisions by zero. Fixes MapTools bugzilla #2644

  • libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings of double to other data types to avoid undefined behaviour if the output range isn't big enough to hold the input value. Fixes MapTools bugzilla #2643, MapTools bugzilla #2642, MapTools bugzilla #2646, MapTools bugzilla #2647

  • libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid undefined behaviour caused by invalid shift exponent. Fixes MapTools bugzilla #2648

  • libtiff/tif_read.c: avoid potential undefined behaviour on signed integer addition in TIFFReadRawStrip1() in isMapped() case. Fixes MapTools bugzilla #2650

  • libtiff/tif_getimage.c: add explicit uint32() cast in putagreytile to avoid UndefinedBehaviorSanitizer warning. Patch by Nicolás Peña. Fixes MapTools bugzilla #2658

  • libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero initialize tif_rawdata. Fixes MapTools bugzilla #2651

  • libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add

    _TIFFcalloc()

  • libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode functions instead of -1 when TIFFFlushData1() fails. Fixes MapTools bugzilla #2130

  • libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable(), OJPEGReadHeaderInfoSecTablesDcTable() and OJPEGReadHeaderInfoSecTablesAcTable() when read fails. Patch by Nicolás Peña. Fixes MapTools bugzilla #2659

  • libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if the YCbCrSubsampling tag is not explicitly present. This helps a bit to reduce the I/O amount when the tag is present (especially on cloud hosted files).

  • libtiff/tif_lzw.c: in LZWPostEncode(), increase, if necessary, the code bit-width after flushing the remaining code and before emitting the EOI code. Fixes MapTools bugzilla #1982

  • libtiff/tif_pixarlog.c: fix memory leak in error code path of PixarLogSetupDecode(). Patch by Nicolás Peña. Fixes MapTools bugzilla #2665

  • libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 -Wimplicit-fallthrough warnings.

  • libtiff/tif_dirread.c: fix memory leak in non DEFER_STRILE_LOAD mode (ie default) when there is both a StripOffsets and TileOffsets tag, or a StripByteCounts and TileByteCounts. Fixes MapTools bugzilla #2689

  • libtiff/tif_ojpeg.c: fix potential memory leak in OJPEGReadHeaderInfoSecTablesQTable(), OJPEGReadHeaderInfoSecTablesDcTable() and OJPEGReadHeaderInfoSecTablesAcTable(). Patch by Nicolás Peña. Fixes MapTools bugzilla #2670

  • libtiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. Patch by Alan Coopersmith + complement by myself. Fixes MapTools bugzilla #2673

  • libtiff/tif_read.c: TIFFFillStrip(): add limitation to the number of bytes read in case td_stripbytecount[strip] is bigger than reasonable, so as to avoid excessive memory allocation.

  • libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory leak when the underlying codec (ZIP, PixarLog) succeeds its setupdecode() method, but PredictorSetup() fails. Credit to OSS-Fuzz (locally run, on GDAL)

  • libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds and non-mapped cases. Credit to OSS-Fuzz (locally run, on GDAL)

  • libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), avoid potential integer overflows with read_ahead in CHUNKY_STRIP_READ_SUPPORT mode. Should especially occur on 32 bit platforms.

  • libtiff/tif_read.c: TIFFFillStripPartial(): avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL)

  • libtiff/tif_read.c: update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT mode with tif_rawdataloaded when calling TIFFStartStrip() or TIFFFillStripPartial(). This avoids reading beyond tif_rawdata() when bytecount > tif_rawdatasize. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. Credit to OSS-Fuzz

  • libtiff/tif_color.c: avoid potential int32 overflow in TIFFYCbCrToRGBInit(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 Credit to OSS-Fuzz

  • libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 overflows in multiply_ms() and add_ms(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 Credit to OSS-Fuzz

  • libtiff/tif_packbits.c: fix out-of-buffer read in PackBitsDecode(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 Credit to OSS-Fuzz

  • libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory allocation when RowsPerStrip tag is missing. Credit to OSS-Fuzz (locally run, on GDAL)

  • libtiff/tif_lzw.c: update dec_bitsleft at beginning of LZWDecode(), and update tif_rawcc at end of LZWDecode(). This is needed to properly work with the latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode.

  • libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp with next_in and tif_rawcc with avail_in at beginning and end of function, similarly to what is done in LZWDecode(). Likely needed so that it works properly with latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. But untested...

  • libtiff/tif_getimage.c: initYCbCrConversion(): add basic validation of luma and refBlackWhite coefficients (just check they are not NaN for now), to avoid potential float to int overflows. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 Credit to OSS Fuzz

  • libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of double to float. Credit to Google Autofuzz project

  • libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz

  • libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of double to float. Credit to Google Autofuzz project

  • libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz

  • libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for refBlackWhite coefficients values. To avoid invalid float to int32 conversion. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 Credit to OSS Fuzz

Tools changes

  • tools/fax2tiff.c (main()): Applied patch by Jörg Ahrens to fix passing client data for Win32 builds using tif_win32.c (USE_WIN32_FILEIO defined) for file I/O. Patch was provided via email on November 20, 2016.

  • tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips() that can cause various issues, such as buffer overflows in the library. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2598

  • tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so that the output buffer is correctly incremented to avoid write outside bounds. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2620

  • tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in readSeparateStripsIntoBuffer() to avoid read outside of heap allocated buffer. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2621

  • tools/tiffcrop.c: fix integer division by zero when BitsPerSample is missing. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2619

  • tools/tiffinfo.c: fix null pointer dereference in -r mode when the image has no StripByteCount tag. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2594

  • tools/tiffcp.c: avoid potential division by zero if BitsPerSamples tag is missing. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2597

  • tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is called, limit the return number of inks to SamplesPerPixel, so that code that parses ink names doesn't go past the end of the buffer. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2599

  • tools/tiffcp.c: avoid potential division by zero if BitsPerSamples tag is missing. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2607

  • tools/tiffcp.c: fix uint32 underflow/overflow that can cause heap-based buffer overflow. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2610

  • tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non assert check. Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2605

  • tools/tiff2ps.c: fix 2 heap-based buffer overflows (in PSDataBW() and PSDataColorContig()). Reported by Agostino Sarubbo. Fixes MapTools bugzilla #2633 and MapTools bugzilla #2634.

  • tools/tiff2pdf.c: prevent heap-based buffer overflow in -j mode on a paletted image. Note: this fix errors out before the overflow happens. There could probably be a better fix. Fixes MapTools bugzilla #2635

  • tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger unspecified behaviour. Fixes MapTools bugzilla #2638

  • tools/tiff2pdf.c: avoid potential invalid memory read in t2p_writeproc(). Fixes MapTools bugzilla #2639

  • tools/tiff2pdf.c: avoid potential heap-based overflow in t2p_readwrite_pdf_image_tile(). Fixes MapTools bugzilla #2640

  • tools/tiffcrop.c: remove extraneous TIFFClose() in error code path, that caused double free. Related to MapTools bugzilla #2535

  • tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow() and cpSeparate2ContigByRow() if BitsPerSample != 8 to avoid heap based overflow. Fixes MapTools bugzilla #2656 and MapTools bugzilla #2657

  • tools/raw2tiff.c: avoid integer division by zero. Fixes MapTools bugzilla #2631

  • tools/tiff2ps.c: call TIFFClose() in error code paths.

  • tools/fax2tiff.c: emit appropriate message if the input file is empty. Patch by Alan Coopersmith. Fixes MapTools bugzilla #2672

  • tools/tiff2bw.c: close TIFF handle in error code path. Fixes MapTools bugzilla #2677

Contributed software changes

None

Changes in TIFF v4.0.9 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.0.9

References

Current Version

v4.0.9 (tag Release-v4-0-9)

Previous Version

v4.0.8

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

Major changes

  • None

Software configuration changes

  • test/Makefile.am: Add some tests for tiff2bw.

  • .appveyor.yml, .travis.yml, build/travis-ci: apply patches 0001-ci-Travis-script-improvements.patch and 0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh (sent to mailing list)

  • .travis.yml, build/travis-ci: new files from 0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by Roger Leigh (sent to mailing list on 2017-06-08). This patch adds support for the Travis-CI service.

  • .appveyor.yml: new file from 0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing list on 2017-06-08). This patch adds a .appveyor.yml file to the top-level. This allows one to opt in to having a branch built on Windows with Cygwin, MinGW and MSVC automatically when a branch is pushed to GitHub, GitLab, BitBucket or any other supported git hosting service.

  • CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger Leigh (sent to mailing list on 2017-06-08). This patch makes the CMake build system support running the tests with MinGW or Cygwin.

  • test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files to test old-style LZW decompression

  • test/common.sh, Makefile.am, CMakeList.txt: updated with above

  • test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff to fix make distcheck. Patch by Roger Leigh

  • nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use /MDd runtime in debug mode.

Library changes

  • libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid int32 overflow in TIFFYCbCrtoRGB(). Fixes OSS-Fuzz #1844. Credit to OSS Fuzz

  • libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for refBlackWhite coefficients values. To avoid invalid float->int32 conversion (when refBlackWhite[0] == 2147483648.f) Fixes OSS-Fuzz #1907. Credit to OSS Fuzz

  • libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), and use it in TIFFReadDirectory() so as to ignore fields whose tag is a codec-specified tag but this codec is not enabled. This avoids TIFFGetField() to behave differently depending on whether the codec is enabled or not, and thus can avoid stack based buffer overflows in a number of TIFF utilities such as tiffsplit, tiffcmp, thumbnail, etc. Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch (MapTools bugzilla #2580) by Raphaël Hertzog. Fixes: MapTools bugzilla #2580, MapTools bugzilla #2693, MapTools bugzilla #2625 (CVE-2016-10095), MapTools bugzilla #2564 (CVE-2015-7554), MapTools bugzilla #2561 (CVE-2016-5318), MapTools bugzilla #2499 (CVE-2014-8128), MapTools bugzilla #2441, MapTools bugzilla #2433.

  • libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols of its internal libtiff copy.

  • libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in ChopUpSingleUncompressedStrip() regarding update of newly single-strip uncompressed files whose bytecount is 0. Before the change of 2016-12-03, the condition bytecount==0 used to trigger an early exit/disabling of strip chop. Re-introduce that in update mode. Otherwise this cause later incorrect setting for the value of StripByteCounts/StripOffsets. (GDAL trac #6924).

  • libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items read in StripOffsets/StripByteCounts tags to the number of strips to avoid excessive memory allocation. Fixes OSS-Fuzz #2215. Credit to OSS Fuzz

  • libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows.

  • libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could potentially be a bug with huge rows.

  • libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images.

  • libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() and BYTECOUNTLOOKSBAD when file is too short.

  • libtiff/tif_predict.c: decorate legitimate functions where unsigned int overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW

  • libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts()

  • libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow

  • libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive CPU consumption on progressive JPEGs with a huge number of scans. See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf.

    Note

    Only affects libtiff since 2014-12-29 where support of non-baseline JPEG was added.

  • libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg memory allocation is above 100 MB. libjpeg in case of multiple scans, which is allowed even in baseline JPEG, if components are spread over several scans and not interleavedin a single one, needs to allocate memory (or backing store) for the whole strip/tile. See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf. This limitation may be overridden by setting the LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro.

  • libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode(). Fixes MapTools bugzilla #2706. Reported by team OWL337

  • libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a double value can fit in a float before casting. Patch by Nicolas RUFF

  • libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, libtiff/tif_read.c: make TIFFReadScanline() works in CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER environment variable the maximum number of scans allowed. Defaults to 100.

  • libtiff/tif_read.c: TIFFFillTile(): add limitation to the number of bytes read in case td_stripbytecount[strip] is bigger than reasonable, so as to avoid excessive memory allocation (similarly to what was done for TIFFFileStrip() on 2017-05-10)

  • libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). Fixes MapTools bugzilla #2708 and OSS-Fuzz #2433. Credit to OSS Fuzz

  • libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() function, variant of TIFFReadEncodedStrip() that allocates the decoded buffer only after a first successful TIFFFillStrip(). This avoids excessive memory allocation on corrupted files.

  • libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() functions associated with LONG8/SLONG8 data type, replace assertion that the file is BigTIFF, by a non-fatal error. Fixes MapTools bugzilla #2712 Reported by team OWL337

  • libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), limiting the number of bytes read. But it could probably have been hit too in CHUNKY_STRIP_READ_SUPPORT mode previously ? Fixes OSS-Fuzz #2454 Credit to OSS Fuzz

  • libtiff/tif_error.c, tif_warning.c: correctly use va_list when both an old-style and new-style warning/error handlers are installed. Patch by Paavo Helde (sent on the mailing list)

  • libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). Fixes OSS-Fuzz #2470 Credit to OSS Fuzz.

  • libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and TIFFReadTile() that allocates the decoded buffer only after a first successful TIFFFillTile(). This avoids excessive memory allocation on corrupted files.

  • libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) Fixes OSS-Fuzz #2554 Credit to OSS Fuzz

  • libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW compressed files.

  • libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW strips. Crashing issue only on memory mapped files, where the strip offset is the last byte of the file, and the file size is a multiple of one page size on the CPU architecture (typically 4096). Credit to myself :-)

  • libtiff/tif_dir.c: avoid potential null pointer dereference in _TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. Fixes MapTools bugzilla #2713

  • tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" mode on PlanarConfig=Contig input images. Fixes MapTools bugzilla #2715 Reported by team OWL337

  • libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). Complementary fix for MapTools bugzilla #2708 in the isMapped() case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated.

  • libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). Complementary fix for MapTools bugzilla #2708 in the isMapped() case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated.

  • libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the arrays that hold StripOffsets/StripByteCounts, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes OSS-Fuzz #2350 Credit to OSS Fuzz

  • libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the arrays that hold StripOffsets/StripByteCounts, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes OSS-Fuzz #2350 Credit to OSS Fuzz

  • libtiff/tif_read.c: add protection against excessive memory allocation attempts in TIFFReadDirEntryArray() on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes MapTools bugzilla #2675

  • libtiff/tif_read.c: add protection against excessive memory allocation attempts in TIFFReadDirEntryArray() on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes MapTools bugzilla #2675

  • libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory allocation when RowsPerStrip tag is missing. Fixes OSS-Fuzz #2683 Credit to OSS-Fuzz

  • libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): properly break from loops on error when stoponerr is set, instead of going on iterating on row based loop.

  • libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped pixel number is not a multiple of the horizontal subsampling, and also in some other cases. Impact putcontig8bitYCbCr44tile, putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile. Fixes MapTools bugzilla #2637 (discovered by Agostino Sarubbo) and OSS-Fuzz #2691 (credit to OSS Fuzz)

  • libtiff/tif_luv.c: further reduce memory requirements for temporary buffer when RowsPerStrip >= image_length in LogLuvInitState() and LogL16InitState(). Fixes OSS-Fuzz #2700 Credit to OSS Fuzz

  • libtiff/tif_dirwrite.c: replace assertion related to not finding the SubIFD tag by runtime check (in TIFFWriteDirectorySec()) Fixes MapTools bugzilla #2727 Reported by team OWL337

  • libtiff/tif_dirwrite.c: replace assertion to tag value not fitting on uint32 when selecting the value of SubIFD tag by runtime check (in TIFFWriteDirectoryTagSubifd()). Fixes MapTools bugzilla #2728 Reported by team OWL337

  • libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed file if the codestream height is larger than the truncated height of the strip. Emit a warning in this situation since this is non compliant.

  • libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() function that checks if the offset is not bigger than INT64_MAX, so as to avoid a -1 error return code of TIFFSeekFile() to match a required seek to UINT64_MAX/-1. Fixes MapTools bugzilla #2726 Adapted from proposal by Nicolas Ruff.

  • libtiff/tif_dirread.c: add NULL check to avoid likely false positive null-pointer dereference warning by CLang Static Analyzer.

  • libtiff/libtiff.def: add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() Fixes MapTools bugzilla #2735

  • libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that honours max_memory_to_use > 0. Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162.

  • libtiff/tif_getimage.c: avoid floating point division by zero in initCIELabConversion() Fixes OSS-Fuzz #3733 Credit to OSS Fuzz

Tools changes

  • tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" mode on PlanarConfig=Contig input images. Fixes MapTools bugzilla #2715 Reported by team OWL337

  • tools/tiffset.c: fix setting a single value for the ExtraSamples tag (and other tags with variable number of values). So tiffset -s ExtraSamples 1 X. This only worked when setting 2 or more values, but not just one.

  • tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the client data. This client data is not used at all at the moment, but it makes the most sense. Issue that the value of client_data.fd was passed where a pointer is expected was reported via email by Gerald Schade on Sun, 29 Oct 2017.

  • tools/tiff2pdf.c (t2p_sample_realize_palette): Fix possible arithmetic overflow in bounds checking code and eliminate comparison between signed and unsigned type.

  • tools/tiff2bw.c (main()): Free memory allocated in the tiff2bw program. This is in response to the report associated with CVE-2017-16232 but does not solve the extremely high memory usage with the associated POC file.

Contributed software changes

None

Changes in TIFF v4.1.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.1.0

References

Current Version

v4.1.0 (tag v4.1.0)

Previous Version

v4.0.10

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

This document describes the changes made to the software between the previous and current versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here. A change summary is also provided by the ChangeLog file included in the release package and by the Git commit history:

Major changes

  • 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(), TIFFGetStrileOffsetWithErr(), TIFFGetStrileByteCount() and TIFFGetStrileByteCountWithErr() 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.

Software configuration changes

  • 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!

Library changes

  • Changes in the libtiff library may be viewed on-line 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.

Tools changes

Contributed software changes

Changes in TIFF v4.2.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.2.0

References

Current Version

v4.2.0 (tag v4.2.0)

Previous Version

v4.1.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

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:

Major changes

  • Optional support for using libdeflate is added.

  • Many of the tools now support a memory usage limit.

Software configuration changes

  • The Microsoft Windows 'nmake' build is resuscitated and provides a default HAVE_STRTOLL setting in 'nmake.opt' which is suitable for MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in order to compile with earlier compiler versions.

  • mingw-w64 cmake build fixes to not add libm

Library changes

  • A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed.

  • EXIF 2.32 and GPS tags and functionality have been upgraded:

    • Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2

    • EXIF-GPS structure, tags and access functions are added as special CustomDirectory (like it was done for EXIF).

    • Reading error for FileSource and SceneType tags corrected.

  • Make TIFFTAG_CFAPATTERN variable count.

  • Cmake configuration fixes for big-endian targets.

  • Added support for optional building against libdeflate for faster Zip/Deflate compression/decompression.

    We now have 2 kinds of builds with the Zip/Deflate codec:

    • zlib only

    • zlib + libdeflate

    Speed improvements in the 35%-50% range can be expected when libdeflate is used. Compression level up to 12 is now supported (capped to 9 when zlib is used). Still requires zlib for situations where libdeflate cannot be used (that is for scanline access, since libdeflate has no streaming mode)

    Pseudo-tag TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE is added to control which subcodec (zlib or libdeflate) should be used (it defaults of course to libdeflate, when it is available). This is mostly aimed at being used on the writing side, to be able to reproduce output of previous libtiff versions at a binary level, in situations where this would be really needed. Or as a safety belt in case there would be unforeseen issues with using libdeflate. It can be used to know when libdeflate is available at runtime (DEFLATE_SUBCODEC_LIBDEFLATE will be the default value in that situation).

    Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa.

Tools changes

  • A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed.

  • ppm2tiff: support any bps value from 1 to 16.

  • tiff2ps, tiff2rgba: A default memory limit is now enforced (256MiB) and a -M option is added to allow the user to adjust the limit.

  • tiff2pdf, tiffcp: A default memory limit is now enforced (256MiB) and a -m option is added to allow the user to adjust the limit.

  • tiffcrop: A default memory limit is now enforced (256MiB) and a -k option is added to allow the user to adjust the limit.

  • tiff2pdf: fix "raw" copy of Deflate streams.

  • tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr

  • tiffcp: disable strip chopping when trying to convert to JBIG compression

Contributed software changes

None

Changes in TIFF v4.3.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.3.0

References

Current Version

v4.3.0 (tag v4.3.0)

Previous Version

v4.2.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

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:

Major changes

  • Build and usage of the library and its utilities requires a C99 capable compiler.

  • New optional codec for the LERC (Limited Error Raster Compression) compression scheme. To have it available, configure libtiff against the SDK available at https://github.com/esri/lerc

  • CMake build: revamp of build scripts

Software configuration changes

  • cmake: revamp of the cmake build scripts. There are impacts on the case of some options.

  • cmake: update minimum version and policy version to 3.9.

  • Remove NMake build support. The functionality provided by the NMake build is now completely superseded by the CMake build.

  • Remove antiquated Scons and makefile.lcc build support.

  • Remove non-functional VMS and WinCE support.

  • autogen.sh now updates config.guess and config.sub from master gnulib version.

Library changes

  • Use of int8, uint8, int16, uint16, int32, uint32, int64, uint64 typedefs is now deprecated. libtiff code and headers no longer use them, and use their C99 standard equivalents (with _t suffix). Those typedefs are still available, with deprecation warnings, but external code is strongly encouraged to use the corresponding C99 stdint.h types. The deprecated types might be removed in a future release.

  • Removal of unused, or now useless due to C99 availability, functions in port/

  • A few issues spotted by static code analysis tools fixed. Compiler warnings addressed.

Tools changes

  • In usage text, insert a line of text summarizing each tool's purpose

  • tiff tools: made display of compression methods and their parameters conditional on their actual availability

  • tiff2ps: exit the loop in case of error (#232)

  • tiff2pdf: check that tiff_datasize fits in a signed tsize_t (#202)

  • tiffsplit: exit with EXIT_FAILURE if there are extra args on the command line

  • tiffcmp: fix comparaison with pixels that are fractional number of bytes (#53)

Contributed software changes

  • iptcutil.c - set #ifdef _WIN32 (was #ifdef WIN32, which failed at build time)

Changes in TIFF v4.4.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.4.0

References

Current Version

v4.4.0 (tag v4.4.0)

Previous Version

v4.3.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

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:

Major changes

None

Software configuration changes

  • Handle absolute paths in pkg-config file (issue #333)

  • Correct fix for the pkgconf file relative paths.

  • cmake: allow running the tests with a read-only source directory.

  • cmake: Fix STRIPCHOP_DEFAULT value in CMake builds.

  • build: Fix static library imports in mingw related to LERC

  • Fix version in libtiff-4.pc.in, and CMake build: Add requirements to pc file

  • cmake: Fix build with CMake 3.10.

  • cmake: Export tiff targets.

  • Make LERC_SUPPORT conditional on ZLIB_SUPPORT

Library changes

New/improved functionalities:

  • TIFFIsBigTiff() function added.

  • Functions TIFFFieldSetGetSize() and TIFFieldSetGetCountSize() added.

  • LZWDecode(): major speed improvements (~30% faster)

  • Predictor 2 (horizontal differenciation): support 64-bit

  • Support libjpeg 9d

Bug fixes:

  • Remove incorrect assert (issue #329)

  • avoid hang in TIFFRewriteDirectory() if a classic file > 4 GB is attempted to be created

  • tif_jbig.c: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes issue #385)

  • TIFFFetchNormalTag(): avoid calling memcpy() with a null source pointer and size of zero (fixes issue #383)

  • TIFFWriteDirectoryTagData(): turn assertion on data length into a runtime check

  • TIFFFetchStripThing(): avoid calling memcpy() with a null source pointer and size of zero (fixes issue #362)

  • TIFFReadDirectory(): avoid calling memcpy() with a null source pointer and size of zero (fixes issue #362)

  • TIFFYCbCrToRGBInit(): avoid Integer-overflow

  • TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS): return error if returned pointer is NULL (fixes issue #342)

  • OJPEG: avoid assertion when using TIFFReadScanline() (fixes issue #337)

  • TIFFReadDirectory(): fix OJPEG hack (fixes issue #319)

  • LZW codec: fix support for strips/tiles > 2 GB on Windows

  • TIFFAppendToStrip(): fix rewrite-in-place logic (fixes issue #309)

  • Fix TIFFRewriteDirectory() discarding directories.

  • TIFFReadCustomDirectory(): avoid crash when reading SubjectDistance tag on a non EXIF directory (issue #316)

  • Fix Segmentation fault printing GPS directory if Altitude tag is present

  • tif_jpeg.c: do not emit progressive scans with mozjpeg. (issue #266)

  • _TIFFRewriteField(): fix when writing a IFD with a single tile that is a sparse one, on big endian hosts

  • Fix all remaining uses of legacy Deflate compression id and warn on use.

Tools changes

Bug fixes:

  • tiffcrop: Fix issue issue #330 and some more from 320 to 349.

  • tiffcrop: fix issue issue #395: generation of strange section images.

  • tiffcrop: fix issue issue #380 and issue #382 heap buffer overflow in extractImageSection

  • tiffcrop: fix FPE (issue #393)

  • tiffcrop: buffsize check formula in loadImage() amended (fixes issue #273, issue #275)

  • tiffcrop.c: Fix issue issue #352 heap-buffer-overflow by correcting uint32_t underflow.

  • tiff2pdf: handle 8-bit palette colormap.

  • tiffcp: avoid buffer overflow in "mode" string (fixes issue #400)

  • tiffcp: Fix incomprehensible setting of orientation tag (fixes issue #29)

  • tiffcp: do not try to fetch compressor-specific tags when not appropriate (fixes issue #396)

  • tiffcp: fix heap buffer overflow (issue #278)

  • tiff2ps: In limitMalloc() check for negative size (fixes issue #284)

  • tiffinfo: add a -M switch to define the maximum heap allocation, and default it to 256 MiB (fixes issue #287, issue #290)

  • tiffinfo: limit more memory allocations using -M switch (fixes issue #288)

  • tiffset: fix global-buffer-overflow for ASCII tags where count is required (fixes issue #355)

  • raw2tiff: check that band number if not zero to avoid floating point exception(fixes issue #338)

  • tiffinfo/tiffdump: improve output for GDAL tags.

Contributed software changes

None

Changes in TIFF v4.5.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.5.0

References

Current Version

v4.5.0 (tag v4.5.0)

Previous Version

v4.4.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

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:

Major changes

  • Whole code base reformatting of .c/.h files using new .clang-format format

  • Documentation changed from static HTML and man pages to Restructured Text (rst). HTML and man pages are now build artifacts.

Software configuration changes

  • SONAME version bumped to 6 due to changes in symbol versioning.

  • autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take into its capability of handling both 8-bit JPEG and 12-bit JPEG in a single build.

  • autoconf/cmake: detect sphinx-build to build HTML and man pages

  • CMakeLists.txt: fix warning with -Wdev

  • CMake: correctly set default value of 'lzma' option when liblzma is detected (issue #482)

  • CMake: Moved linking of CMath::CMath into CMath_LIBRARY check.

  • Fix CMake build to be compatible with FetchContent.

  • cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS (issue #443)

  • cmake: Fixes for Visual Studio 2022.

  • Adds Requires.private generation so that pkg-config can correctly find the dependencies of libtiff.

  • Fix dependency on libm on Android

  • cmake: libtiffxx is static on win32

  • Fix build in tif_lzw.c

  • CMake: Add options for disabling tools, tests, contrib and docs.

Library changes

New/improved functionalities:

API/ABI breaks:

Bug fixes:

  • TIFFWriteRawStrip(): restore capabilities to append data in the current strip (issue #489)

  • _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on broken files (issue #479)

  • TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB (oss-fuzz #53137)

  • Replace sprintf calls with snprintf to fix warnings on macOS 13 SDK

  • Added warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (issue #438)

  • tif_dirinfo.c: fix TIFFTAG_CLIPPATH tag declaration (issue #439)

  • tif_dirinfo.c: fix TIFFTAG_COMPRESSION and _BITSPERSAMPLE tag declaration (issue #364)

  • Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value (issue #149, issue #150, issue #152, issue #168, issue #250, issue #269,:issue:398, CVE-2022-3599, issue #456)

  • TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case (oss-fuzz #52309)

  • Improved/fixes IFD-Loop Handling (issue #455).

  • Update getimage to support large raster images.

  • Presetting of default tag values extended (e.g. PlanarConfig). (issue #449)

  • Deal with RichTIFFIPTC tag written with LONG type (issue #225)

  • TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (issue #442)

  • tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional compile-time version check

  • TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could cause issues with reading JPEG compressed files

  • _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific tag and the codec is not configured (issue #433, issue #486, CVE-2022-34526)

  • Add basic 16 bit cielab support.

  • WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding

  • tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2

Tools changes

New/improved functionality:

  • tiffinfo: Updated to parse through SubIFDs and show their tags.

Bug fixes:

Contributed software changes

None

Changes in TIFF v4.5.1 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.5.1

References

Current Version

v4.5.1 (tag v4.5.1)

Previous Version

v4.5.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

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:

Warning

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.

Warning

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 https://gitlab.com/libtiff/libtiff/-/merge_requests/496 and https://gitlab.com/libtiff/libtiff/-/merge_requests/494

Major changes

None

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 tif_config.h.cmake.in and tiffconf.h.cmake.in 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 #526).

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

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

  • CMake: fix export of INTERFACE_INCLUDE_DIRECTORIES

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 #484).

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

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

  • 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 #530).

  • TIFFClose() avoid NULL pointer dereferencing (issue #515).

  • 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 #513).

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

  • tif_ojpeg.c: fix issue #554 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 #548).

Documentation

  • 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

None

Changes in TIFF v4.6.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.6.0

References

Current Version

v4.6.0 (tag v4.6.0)

Previous Version

v4.5.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

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:

Major changes

Warning

This version removes a big number of utilities that have suffered from lack of maintenance over the years and were the source of various reported security issues. See "Removed functionality" below for the list of removed utilities. Starting with libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, tiffdump, tiffcp and tiffset) was discontinued, due to the lack of contributors able to address reported security issues. tiff2ps and tiff2pdf source code has been moved in a unsupported category, no longer built by default, but are still part of the the source distribution. Other retired utilities are in a archive/ directory, only available in the libtiff git repository. Issues related to unsupported and archived tools will no longer be accepted in the libtiff bug tracker.

Software configuration changes

  • TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and TIFF_LIBRARIES for compatibility with FindTIFF.cmake as shipped by CMake (fixes issue #589)

  • Update CMake and autoconf scripts to consistently update LibTIFF version defines and references in various files when version definition in configure.ac has been changed.

    • Move in tiffvers.h from libtiff source directory to libtiff build directory.

    • Remove unused version information from tif_config.h

    • With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h are consistently updated from configure.ac. The version release-date is taken from file RELEASE-DATE.

    • The files VERSION and RELEASE-DATE are only updated with a special CMake target build: cmake --build . --target tiff_release.

    • For autotools, version information is updated from configure.ac with ./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE.

    • ./configure generates tiffvers.h with the cached version information and LIBTIFF_RELEASE_DATE.

    • "make release" updates tiffvers.h and VERSION file with cached version info and RELEASE-DATE file and tiffves.h with the current date.

  • CMake: fix build with -Dstrip-chopping=off (fixes issue #600)

Library changes

New/improved functionalities:

  • Fix using __attribute__ libtiff with clang-for-windows

API/ABI breaks:

  • None

Bug fixes:

  • WebP decoder: validate WebP blob width, height, band count against TIFF parameters to avoid use of uninitialized variable, or decoding corrupted content without explicit error (fixes issue #581, issue #582).

  • WebP codec: turn exact mode when creating lossless files to avoid altering R,G,B values in areas where alpha=0 (https://github.com/OSGeo/gdal/issues/8038)

  • Fix TransferFunction writing of only two transfer functions.

  • TIFFReadDirectoryCheckOrder: avoid integer overflow. When it occurs, it should be harmless in practice though (https://gitlab.com/libtiff/libtiff/-/merge_requests/512)

Documentation

  • TiffField functions documentation updated with return behaviour for not defined tags and determination of write-/read-count size.

Tools changes

Removed functionality:

  • The following tools are no longer compiled and have been moved to archive/tools:

    • fax2ps

    • fax2tiff

    • pal2rgb

    • ppm2tiff

    • raw2tiff

    • rgb2ycbcr

    • thumbnail

    • tiff2bw

    • tiff2rgba

    • tiffcmp

    • tiffcrop

    • tiffdither

    • tiffgt

    • tiffmedian

  • The following tools are no longer compiled by default: tiff2ps and tiff2pdf. They have been moved to tools/unsupported. They can be built by setting --enable-tools-unsupported for autoconf, or -Dtiff-tools-unsupported for CMake, but as the name imply, they are no longer supported by upstream. Packagers are suggested not to enable those options.

  • tiffcp: remove -i option (ignore errors), because almost all fuzzer issues were consequential errors from ignored errors because of the "-i" option.

New/improved functionality:

  • None

Bug fixes:

  • tiffset: fix #597: warning: comparison of integer expressions of different signedness. (fixes issue #597)

  • tiffcp: fix memory corruption (overflow) on hostile images (fixes issue #591)

Test changes

  • Add missing test_write_read_tags.c and test_transferfunction_write_read.c in tarball (fixes issue #585) and correct "long" issue.

  • Don't use "long" because can be int32_t or int64_t, depending on compiler and system.

Changes to contributed and unsupported tools

  • raw2tiff: fix integer overflow and bypass of the check (fixes issue #592)

Changes in TIFF v4.7.0 — LibTIFF 4.7.0 documentation

Changes in TIFF v4.7.0

References

Current Version

v4.7.0 (tag v4.7.0)

Previous Version

v4.6.0

Primary Download Site

https://download.osgeo.org/libtiff/

Home HTTP Site #1

http://www.simplesystems.org/libtiff/

Home HTTP Site #2

https://libtiff.gitlab.io/libtiff/

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.

Major changes

This version restores in the default build the availability of the tools that had been dropped in v4.6.0 (cf RFC 2: Restoring Needed LibTIFF Tools)

Software configuration changes

  • autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection

  • autoconf build: fix error when running make clean (fixes issue #630)

  • autoconf build: back off the minimum required automake version to 1.11

  • autoconf.ac: fix detection of windows.h for mingw (fixes issue #605)

  • libtiff-4.pc: Fix Requires.private missing Lerc. It provides a .pc file starting from version 4 (in autoconf builds, we assume that liblerc is at least version 4)

  • CMake: Fix TIFF_INCLUDE_DIRS

  • CMake: MinGW compilers don't need a .def file for shared library

  • CMake: move libdeflate and Lerc to Requires.private

  • CMake: enable resource compilation on all Windows.

Library changes

New/improved functionalities:

  • Add TIFFOpenOptionsSetMaxCumulatedMemAlloc(). This function complements TIFFOpenOptionsSetMaxSingleMemAlloc() to define the maximum cumulated memory allocations in byte, for a given TIFF handle, that libtiff internal memory allocation functions are allowed.

API/ABI breaks:

  • None

Bug fixes:

  • TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged.

  • TIFFXYZToRGB: avoid integer overflow (fixes issue #644)

  • uv_decode() and uv_encode(): avoid potential out-of-bounds array index (fixes issue #645)

  • Fix cases where tif_curdir is set incorrectly. Fix cases where the current directory number (tif_curdir) is set inconsistently or incorrectly, depending on the previous history.

  • TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) output buffer if failure (fixes issue #375)

  • OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes issue #183)

  • ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL

  • LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values

  • tif_fax3.c: error out after a number of times end-of-file has been reached (fixes issue #583)

  • LZW: avoid warning about misaligned address with UBSAN (fixes issue #616)

  • TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row (fixes issue #622, CVE-2023-52356)

  • tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests

  • Avoid FPEs (division by zero) in tif_getimage.c.

  • Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros by checking for denominator not zero before macros are executed. (fixes issue #628)

  • Add non-zero check before division in TIFFComputeStrip()

  • Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active

  • Setting the TIFFFieldInfo field set_field_type should consider field_writecount not field_readcount

  • Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated memory in the tif-structure.

  • For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is set at the end to avoid deleting the last character. (fixes issue #579)

  • Check return value of _TIFFCreateAnonField(). (fixes issue #624, CVE-2024-7006)

  • Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857)

  • Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes issue #618)

  • tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes issue #608)

Other changes:

  • Fix warnings with GCC 14

  • tif_dir.c: Log source file, line number, and input tif for directory count error (fixes issue #627)

  • Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() changed to using set_field_type.

  • tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups

  • Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble()

  • Remove support for _MSC_VER < 1500.

  • Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__

Documentation

  • Amend manpages for changes in current directory index behaviour

  • Note on using TIFFFlush() before TIFFClose() to check that the data has been successfully written to the file. (fixes issue #506)

  • Update TIFF documentation about TIFFOpenOptions.rst and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes (relates to CVE-2024-7006)

Tools changes

Re-added tools:

  • fax2ps

  • fax2tiff

  • pal2rgb

  • ppm2tiff

  • raw2tiff

  • rgb2ycbcr (not installed)

  • thumbnail (not installed)

  • tiff2bw

  • tiff2rgba

  • tiffcmp

  • tiffcrop

  • tiffdither

  • tiffgt

  • tiffmedian

  • tiff2ps

  • tiff2pdf

New/improved functionality:

  • tiff2rgba: Add background gradient option for alpha compositing

  • tiffcp: -i flag restored

Bug fixes:

  • tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054

  • tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection"

  • tiffcrop: fix buffer overflows, use after free (fixes issue #542, issue #550, issue #552)

  • tiff2pdf: address Coverity scan issues

  • tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF

  • tiff2pdf: fix issue with JPEG restart-interval marker when converting from JPEG-compressed files (fixes issue #539)

  • tiff2pdf: red and blue were being swapped for RGBA decoding (fixes issue #253)

  • tiff2pdf: fixes issue #596

  • thumbnail: address Coverity scan issues

  • tiffcp: Add check for limitMalloc return to fix Coverity 1603334

  • tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG

  • tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputing to compression != JPEG (refs issue #571)

  • tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG

  • tiffcp: Check also codec of input image, not only from output image (fixes issue #606)

  • Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions.

  • fax2ps and fax2tiff: memory leak fixes (fixes issue #476)

  • tiffmedian: memory leak fixes (fixes issue #599)

  • fax2tiff: fix EOFB interpretation (fixes issue #191)

  • fax2tiff: fix issue with unreasonable width input (fixes issue #249)

  • tiffcp and tiffcrop: fixes issue #228

  • tiff2rgba: fixes issue #469

  • tiffdither: fixes issue #473

  • tiffdump: fix wrong printf formatter in error message (Coverity 1472932)

  • tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997)

  • tifcp/tiffset: use correct format specifiers

Changes to contributed and unsupported tools

  • contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680)

Changes in TIFF v3.4beta016 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta016 (no release tag) Previous Version v3.4beta004 (no references to earlier releases exist) Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * bit order was corrected for Pentium systems * a new define, :c:macro:`HOST_BIGENDIAN`, was added for code that wants to statically use information about native cpu byte order Library changes --------------- * the G3/G4 decoder was replaced by a new one that is faster and has smaller state tables * Niles Ritter's client tag extension hooks were added * a new routine :c:func:`TIFFCurrentDirOffset` was added for applications that want to find out the file offset of a TIFF directory * the calculation of the number of strips in an image was corrected for images with certain esoteric configurations * a potential memory leak (very unlikely) was plugged * the ``TIFFReadRGBAImage`` support was completely rewritten and new, more flexible support was added for reading images into a fixed-format raster * YCbCr to RGB conversion done in the :c:func:`TIFFReadRGBAImage` support was optimized * a bug in JPEG support calculation of strip size was corrected * the LZW decoder was changed to initialize the code table to zero to lessen potential problems that arise when invalid data is decoded * :c:func:`tiffcomp.h` is now aware of OS/2 * some function prototypes in :file:`tiffio.h` and :file:`tiffiop.h` that contained parameter names have been changed to avoid complaints from certain compilers Portability support changes --------------------------- * :file:`Makefile.in` has been corrected to use the parameters chosen by the :program:`configure` script Tools changes ------------- * :program:`fax2ps` has been rewritten and moved over from the user contributed software * an uninitialized variable in :program:`pal2rgb` has been fixed * :program:`ras2tiff` now converts 24-bit RGB raster data so that samples are written in the proper order * :program:`tiff2ps` has been updated to include fixes and enhancements from Alberto Accomazzi * :program:`tiffcp` now has a "``-o``" option to select a directory by file offset * :program:`tiffinfo` is now capable of displaying the raw undecoded image data in a file * :program:`tiffgt` has been rewritten to use the new ``TIFFRGBAImage`` support and to handle multiple files Changes in TIFF v3.4beta016 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta016 (no release tag) Previous Version :doc:`v3.4beta007 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for configuring the Deflate codec * support was added for the HTML documentation * codecs that are not configured for inclusion in the library are no longer compiled Library changes --------------- * support was added for registering new codecs external to the library and for overriding the codecs that are builtin to the library * emulation support for the old ``DataType`` tag was improved * support was added for the ``SMinSampleValue`` and ``SMaxSampleValue`` tags * the library no longer ignores ``TileWidth`` and ``TileLength`` tags whose values are not a multiple of 16 (per the spec); this permits old, improperly written, images to be read * the support for the ``Predictor`` tag was placed in a reusable module so that it can be shared by multiple codecs * experimental compression support was added for the Deflate algorithm (using the freely available zlib package) * a new routine, :c:func:`TIFFWriteBufferSetup` was added à la the routine :c:func:`TIFFReadBufferSetup` * the DSO version of the library is now statically linked with the JPEG and Deflate libraries; this means applications that link against the DSO do not also need to link against these ancillary libraries Tools changes ------------- * all the tools now use common code to process compress-oriented arguments * :program:`tiffdump` should now compile on a Macintosh with MPW Documentation changes --------------------- * everything was updated Contributed software changes ---------------------------- * :file:`contrib/dbs/xtiff` was made to compile * :file:`contrib/mac-mpw` is new support for compiling the software on a Macintosh under MPW * :file:`contrib/tags` is information on how to use the tag extenion facilities; consult :file:`contrib/tags/README` for details Changes in TIFF v3.4beta018 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta018 (no release tag) Previous Version :doc:`v3.4beta016 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * configure now recognizes IRIX 6.x systems * configure now uses ``ENVOPTS`` when searching for an ANSI C compiler; this fixes a problem configuring the software under HP/UX with the native C compiler * configure now correctly recognizes memory-mapped files are supported under AIX Library changes --------------- * ``make install`` now properly installs the include files * some portability fixes from Bjorn Brox * the G3/G4 codec now warns about decoded rows that are longer than the image/tile width * changes from Frank Cringle to make the library work with the gcc-specific bounds checking software * miscellaneous fixes to :c:func:`TIFFPrintDirectory` * bug fix to correct a problem where :c:func:`TIFFWriteRawStrip` could not be used to automatically grow an image's length Tools changes ------------- * fixes from Frank Cringle to update :program:`fax2tiff` * portability fixes to :program:`tiff2bw` and :program:`tiffcmp` * :program:`tiffdump` now uses the byte swapping routines in the library Changes in TIFF v3.4beta024 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta024 (no release tag) Previous Version :doc:`v3.4beta018 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * It is now possible to setup the software to build only the library; :program:`configure` recognizes this is the intent when the :file:`VERSION`, :file:`tiff.alpha`, and :file:`tif_version.c` files are in the local directory (i.e. :file:`.`) * :program:`configure` no longer tries to setup HTML materials * include file directories needed in building the library are now specified with a ``DIRS_LIBINC`` config parameter * configure no longer checks for alternate compilers if ``CC`` is set; if the specified compiler is not found or is not appropriate the configuration procedure aborts * the :file:`port.h` file generated by configure is now used only by the library and as such as have been moved to the :file:`libtiff` directory * there is beginning support for building DSO's on systems other than IRIX * configure now verifies the JPEG and zlib directory pathnames by checking for well-known include files in these directories * configure no longer creates the :file:`dist` directory needed only on SGI machines (for building SGI binary distributions) * a bug was fixed whereby configure would incorrectly set ``ENVOPTS`` when building the software with gcc under AIX Library changes --------------- * two new typedefs were added to :file:`tiff.h`: :c:type:`int8` and :c:type:`uint8` for signed and unsigned 8-bit quantities, respectively; these are currently used only by programs in the :file:`tools` directory * the ``BadFaxLines``, ``CleanFaxData``, and ``ConsecutiveBadFaxLines`` tags are now supported with Group 4 compression * byte order is now correctly identified on 64-bit machines * a bug was fixed in the PackBits decoder where input data would appear short when a no-op run was present * a bug was fixed in calculations with very wide strips * :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteRawStrip` were extended to support dynamically growing the number of strips in an image (must set ``ImageLength`` prior to making calls though) * :c:func:`TIFFDefaultTileSize` now rounds tile width and height up to a multiple of 16 pixels, as required by the TIFF 6.0 specification * the file :file:`version.h` is now built by a new :program:`mkversion` program; this was done for portability to non-UNIX systems * support was added for the Acorn RISC OS (from Peter Greenham) * the builtin codec table is now made ``const`` when compiling under VMS so that :file:`libtiff` can be built as a shared library * support for the PowerPC Mac (from Ruedi Boesch) * support for Windows NT/Windows 95 (from Scott Wagner) Tools changes ------------- * the tools no longer include :file:`port.h` * various portability fixes; mostly to eliminate implicit assumptions about how long :c:type:`int32` data types are * PostScript Level II additions to :program:`tiff2ps` from Bjorn Brox * :program:`sgi2tiff` now handles RGBA images Documentation changes --------------------- * the documentation has been updated to reflect the current state of the software * some routines have been moved to different manual pages to group like-routines together Contributed software changes ---------------------------- * support was added for the Acorn RISC OS (from Peter Greenham) * support for Windows NT/Windows 95 contributed for a previous version of this software was sort of incorporated (it's broken right now) (from Scott Wagner) Changes in TIFF v3.4beta028 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta028 (no release tag) Previous Version :doc:`v3.4beta024 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * a "``-noninteractive``" flag was added to configure to control whether or not it prints and prompts for configuration information * various typos and fixes were made in configure for the the library-only build support (this and other configure fixes from `Richard Mlynarik `_) * bugs were fixed in the handling of pathnames supplied for external packages; e.g. ``DIR_JPEG`` * the handling of ``SETMAKE`` is now done properly * the default prototype function declaration for :c:func:`pow` was corrected * a bug was fixed in :file:`libtiff/Makefile.in` that caused installation to fail on systems without DSO support Library changes --------------- * Acorn RISC O/S support that was accidentally left out of the left out of the previous distribution is present (from Peter Greenham) * complaints about unknown and/or unsupported codecs have been delayed until they are invoked; this permits applications to open images and look at tags even if the image data is compressed with an unknown/unsupported compression scheme * bugs in handling unknown tags have been corrected; applications that use multiple codecs, each with codec-specific tags, no longer generate confusing error messages * a missing pseudo-tag definition in the CCITT G3 codec was fixed (this problem caused core dumps in the :program:`tiffcp` program) * pseudo-tags are now treated specially; they are always considered to be set (i.e. they do not use bits in the ``FIELD_*`` bit-vectors). * the use of strip chopping can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``C``" to enable strip chopping and "``c``" to disable) * two bugs were fixed in the writing of opposite-endian byte-order files * support was added for three new fax-related tags registered to SGI: ``FaxRecvParams``, ``FaxRecvTime``, and ``FaxSubAddress`` * the bit order of image data read and written can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``B``" to force MSB2LSB bit order, "``L``" for LSB2MSB bit order, and "``H``" for the bit order of the native CPU) * the byte order of image and tag data written to newly-created files can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``b``" to force Big-Endian byte order and "``l``" to force Little-Endian byte order) * the use memory-mapped files for images opened read-only can now be controlled on a per-file basis through a mode parameter supplied when opening a file ("``M``" to enable use of memory-mapped files and "``m``" to disable use) * the use of the :c:macro:`WIN32` define in :file:`tiffiop.h` has been replaced by :c:macro:`__WIN32__` Tools changes ------------- * :program:`fax2ps` now does a ``save`` and ``restore`` around each page of PostScript; this fixes a problem with VM overflow when printing a many-page document on some printers * a bug in the handling of 3-channel images by :program:`ras2tiff` was fixed * :program:`tiffcp` has new options to control the byte order of newly created files: "``-B``" for Big-Endian byte order, "``-L``" for Little-Endian byte order; a "``-M``" option to disable the use of memory-mapped files, and a "``-C``" option to disable the use of strip chopping * bugs were fixed in :program:`tiffcp` handling of codec-specific tags Documentation changes --------------------- * the :c:func:`TIFFOpen` page has been updated to reflect the new optional open mode parameters Contributed software changes ---------------------------- * :file:`contrib/win95` contains information and code from `Philippe Tenenhaus <100423.3705@compuserve.com>`_ about using the software under Windows 95 * :file:`contrib/winnt` contains information and code from `Dave Dyer `_ about using the software under Windows NT Changes in TIFF v3.4beta029 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta029 (no release tag) Previous Version :doc:`v3.4beta028 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :program:`configure` now relativizes pathname references given in "``-L``" options (as frequently specified when configuring ancillary packages) * problems related to configuring the software on Ultrix 4.4 have been corrected * the shell to use in Makefiles and scripts can now be set with the ``SCRIPT_SH`` configuration parameter * comments in :file:`config.site` now correctly indicate how to setup the use of ancillary packages Library changes --------------- * mods for building the software on a Mac using the MetroWerks CodeWarrior compilers * a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in a strip/tile might not be decoded; this was seen only when decoding multi-strip images * a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not being properly registered Contributed software changes ---------------------------- * :file:`contrib/mac-cw` contains information and code from `Niles Ritter `_ about building the software with the MetroWerks CodeWarrior compilers on Macintosh systems Changes in TIFF v3.4beta031 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta031 (no release tag) Previous Version :doc:`v3.4beta029 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :program:`configure` now captures significantly more information in the :file:`config.log` file and provides more information when it is unable to setup a configuration * support was added for building shared libraries on more systems: AIX, HPUX, Solaris, and Linux. * a new configuration parameter ``LIBCOPTS`` was added for passing arguments to the C compiler to use when building only the library; this is part of the enhanced support for building shared libraries * include files for optional packages that reside in :file:`/usr/include` are now handled correctly * build trees may now be configured using either relative or absolute pathnames to the source distribution * several new configuration parameters were added, mainly for building shared libraries: ``DIST_MAJOR``, ``DIST_MINOR``, ``DIST_ALPHA``, and ``DSOSUF_VERSION`` Library changes --------------- * the Deflate support has been revised: it requires version 0.99 of the zlib software distribution, **the output format has changed and is incompatible with previous versions of this library** (each strip now includes a header read and written by the zlib library) * the codec name printed by the :c:func:`TIFFPrintDirectory` routine is now taken from the codec table instead of from a builtin table; this means that application-defined codecs are handled correctly * a new symbol was added that contains the library version number; this can be used to do a compile-time compatibility check of the library version Documentation changes --------------------- * the creation and installation of manual pages was redone; it now implements the documented "configuration scheme" Changes in TIFF v3.4beta032 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta032 (no release tag) Previous Version :doc:`v3.4beta031 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * various fixups and subtle improvements to :program:`configure` from Richard Mlynarik Library changes --------------- * a new codec from Pixar designed for high-resolution color images; note that this codec is not configured by default * a bug fix for reading tags with a single ``FLOAT`` value * change to the :c:func:`TIFFGetField` calling convention: a tag that has a single value of type ``DOUBLE`` is now retrieved by passing a ``double*`` instead of a ``double**`` (this change makes the handling of tags with ``DOUBLE`` values identical to the handling of tags with ``FLOAT`` values) * fix to VMS support for the handling of floating point values Tools changes ------------- * :program:`tiffdump` now handles tags with ``FLOAT`` and ``DOUBLE`` values Contributed software changes ---------------------------- * updates to the Acorn OS support from Peter Greenham Changes in TIFF v3.4beta033 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta033 (aka the v3.4 release) (no release tag) Previous Version :doc:`v3.4beta032 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for building the library as a DSO under OSF/1 Library changes --------------- * fixes to the Pixar codec * portability mods for VMS Tools changes ------------- * fixes to :program:`gif2tiff` and :program:`ppm2tiff` for building under MS/DOS * portability mods to :program:`fax2ps` and :program:`ycbcr` for VMS Contributed software changes ---------------------------- * a new package from Alexander Lehmann for building the library and tools under MS/DOS with DJGPP v2 * updated VMS support from Karsten Spang Changes in TIFF v3.4beta034 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta034 (no release tag) Previous Version :doc:`v3.4beta033 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for building the library as a DSO under NetBSD * a bug was fixed in the DSO support for Linux * the handling of version strings has changed slightly to simplify parsing * a new parameter, ``TIFFLIBREF``, was added to control how the library is referenced when linking programs in the :file:`tools` directory Library changes --------------- * DSO creation under Solaris now forces the DSO name with a ``-h`` option * the interface to the :program:`mkversion` program was changed to eliminate the need to parse files * a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder * ANSI IT8 TIFF/IT tag definitions were added to :file:`tiff.h` Changes in TIFF v3.4beta035 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta035 (no release tag) Previous Version :doc:`v3.4beta034 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added installing the HTML documentation * support was added for building the library as a DSO under FreeBSD Library changes --------------- * the interface to the :program:`mkversion` program was restored to the form used prior to v3.4beta034 * several portability problems for 16-bit systems were fixed Changes in TIFF v3.4beta036 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.4beta036 (no release tag) Previous Version :doc:`v3.4beta035 ` Master Download Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * support was added for building the library as a DSO under HP-UX with the native C compiler * tools are now built with explicit pathnames for the DSO under IRIX, Solaris, and Linux * DSO configuration support for Linux was changed to require that :file:`libc.so` only be readable (not executable) Library changes --------------- * support was add for ICC: ``NumberOfInks``, and ``ICCProfile`` * a memory leak caused by doing ``TIFFSetDirectory(0)`` was fixed * a bug was fixed whereby certain multi-directory files were not properly handled when accessed by mapping the data into memory * the strip chopping support is now always compiled into the library with the default usage controlled by a :c:macro:`STRIPCHOP_DEFAULT` configuration parameter * the strip chopping support no longer chops tiled images * all static strings are now const---for shared libraries * the logic for estimating the strip size of images without ``StripByteCounts`` tag was improved by handling ``PlanarContig`` images differently from ``PlanarSeparate`` * a bug was fixed in the G3 codec when converting the Y resolution of data specified in metric units * a bug was fixed in the G3/G4 decoder for data where lines terminate with a ``v0`` code * the ``TIFFRGBAImage`` support was changed to scale 16-bit colormap entries more conservatively to avoid problems with applications that do not generate fully saturated pixel values * the LZW decoder was changed to use a more conservative scheme when bounds checking the hash table array; this avoids pitfalls with systems that load objects into memory in unusual locations * a bug was fixed in :c:func:`TIFFPrintDirectory` handling of the ``InkNames`` tag * :c:func:`TIFFPrintDirectory` now understands ``NumberOfInks`` and ICC-related tags * the routines for reading image data now provide more useful information when a read error is encountered * support was added for compiling with Microsoft Visual C++ 4.0 Tools changes ------------- * a bug was fixed in :program:`pal2rgb` colormap handling * :program:`tiff2ps`: * now includes John Wehle's changes for maintaining the aspect ratio of images when scaling and for honoring the deadzone on a page when generating PostScript Level II * does a better job guarding against the mishandling of greyscale images * now correctly converts X- and Y-resolution values specified in metric units * :program:`tiffdump`: * has a new "``-m``" option to control the maximum number of indirect data values printed for a tag (by default 24) * understands several new tags * now shows any terminating null in ASCII strings * :program:`tiffinfo` now suppresses strip chopping when interpreting an image; a new "``-z``" option has been added to enable strip chopping Changes in TIFF v3.5.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.1 (no release tag) Previous Version v3.4beta037 (missing release notes, go to :doc:`v3.4beta036 `) Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ None. Library changes --------------- * Support was added for IPTC Newsphoto metadata (:c:macro:`TIFFTAG_IPTCNEWSPHOTO`) * Support was added for photoshop caption handling (:c:macro:`TIFFTAG_PHOTOSHOP`) Contributed software changes ---------------------------- * `Bill Radcliffe's `_ :program:`iptcutil` was added to the :file:`contrib` subdirectory . It can convert an IPTC binary blob to ASCII text and vice-versa. The blob itself can be extracted from or added to an image with the `ImageMagick `_ :program:`convert` (1) utility. Changes in TIFF v3.5.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.2 (no release tag) Previous Version :doc:`v3.5.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * Corrected alpha versioning. * Removed distinction between alpha and release targets in :file:`Makefile.in`. * Added release.stamp target, which tags cvs tree, and updates :file:`RELEASE-DATE` * Added ``releasediff`` target, which diffs tree with source as of date in :file:`RELEASE-DATE` * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving away from alpha/non-alpha distinctions). Library changes --------------- * Added IRIX/gcc, and OSF/1 4.x support on behalf of `Albert Chin-A-Young `_. * Added :c:func:`TIFFReassignTagToIgnore` API on behalf of `Bruce Cameron `_. Man page still pending. * pre-remove :file:`so` link before softlink in ``LINUXdso`` action in :file:`libtiff/Makefile.in` to avoid failure on ``LINUXdso`` builds other than the first. * Fixed problem with :c:func:`cvtcmap` in :file:`tif_getimage.c` modifying the colormaps owned by the TIFF handle itself when trying to fixup wrong (eight bit) colormaps. Corrected by maintaining a private copy of the colormap. * Added :c:func:`TIFFReadRGBATile`/:c:func:`TIFFReadRGBAStrip` support in :file:`tif_getimage.c`. * Applied "``a``" mode fix to :file:`tif_win32.c`/:c:func:`TIFFOpen` as suggested by `Christopher Lawton `_. * Set ``O_BINARY`` for :file:`tif_unix.c` :c:func:`open` ... used on cygwin for instance. * Added ``CYGWIN`` case in configure. * Applied Francois Dagand's patch to handle fax decompression bug. (sizes >= 65536 were failing) Contributed software changes ---------------------------- * Added :program:`addtiffo` (add overviews to a TIFF file) in contrib. Didn't put it in tools since part of it is in C++. Changes in TIFF v3.5.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.3 (:tag:`Release-v3-5-3`) Previous Version :doc:`v3.5.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- Please note the most important change: **LZW compression has been removed**. Unisys has the patent on LZW compression and have been very active in their enforcement of late, demanding payments of $5000 or more from websites using unlicensed software to create GIF's. They could well do the same do persons using libtiff to create LZW compressed TIFF images. From `Burn All GIF's Day `_: The catch is that it appears to be difficult or impossible to get a Unisys license to use LZW in free software that complies with the Open Source Definition Unfortunately, the removal of LZW compression means that saved image size has grown dramatically. Without a change in the TIFF spec to support another lossless compression format, this is unavoidable. The library can use zip for lossless compression, but as this is not part of the spec, TIFFs using zip compression may not work with other software. We will be making a patch available that will contain the LZW compression code for users who have either obtained a license from Unisys or are willing to risk it. LZW decompression is unchanged. Software configuration changes ------------------------------ * Added zip creation to release makefile target Library changes --------------- * Added html for :file:`TIFFWriteTile.3t` man page. * Added some changes to :file:`tif_write.c` to support rewriting existing fixed sized tiles and strips. Code mods disabled by default, only enabled if :c:macro:`REWRITE_HACK` is defined for now. * Added :file:`TIFFWriteTile.3t` man page. * Added notes on use of :file:`makefile.vc` in :file:`build.html`, and fixed email subscription address. * Did some casts cleaning up to reduce compiler warnings in :file:`tif_fax3.c`, from `Bruce Cameron `_---modifications of changes made by Frank (sun cc still complained on cast). * fixed various VC++ warnings as suggested by `Gilles Vollant `_. * Modified :file:`TIFFquery.3t` man pages info on :c:func:`TIFFIsByteSwapped` to not imply applications are responsible for image data swapping. * HTML-ized the man pages, added to :file:`html/man`. * Removed LZW Compression to comply with Unisys patent extortion. * Corrected one remaining ``16 -> 32`` bit value in :file:`tif_fax3.c`, From `Ivo Penzar `_. * Added patch from Ivo Penzar to have :c:func:`TiffAdvanceDirectory` handle memory mapped files. `Ivo Penzar `_. Contributed software changes ---------------------------- * Fixed apocalypse-inducing y2k bug in :file:`contrib/ras/ras2tiff.c` Changes in TIFF v3.5.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.4 (:tag:`Release-v3-5-4`) Previous Version :doc:`v3.5.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * None. Library changes --------------- * Added Pixar tag support. Contributed by `Phil Beffery `_. * Made one more change to :file:`tif_dir.c` for removal of LZW compression. Also added notice when LZW compression invoked. * Fixed bug that caused LZW (non) compression to segfault. Added warning about LZW compression removed being removed, and why. Tools changes ------------- * Changed default compression in tools to :c:macro:`TIFF_PACKBITS`, and changed usage descriptions in tools to reflect removal of LZW compression * Added ``nostrip`` to install in :file:`tools/Makefile.in` so that debugging symbols are kept. * Made Packbits the default compression in :file:`tools/tiff2rgba.c` instead of LZW. Changes in TIFF v3.5.5 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.5 (:tag:`Release-v3-5-5`) Previous Version :doc:`v3.5.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :file:`configure`: added test for libc6 for linux targets. Bug reported by `Stanislav Brabec `_. * :file:`configure`: fixed bugs in sed scripts (applied sed script ``s:/@:s;@:;s:/s;;:;:`` to configure). fix submitted by `Stanislav Brabec `_. * :file:`tools/iptcutil` was not in files list, and wasn't being added to tar archive. :file:`Updated Makefile.in`. * Added 3.5 docs to :file:`html/Makefile.in`. Thanks to `Stanislav Brabec `_ * Fixed :file:`tools/tiffcmp` so that ``stopondiff`` testing works. Patch care of `Joseph Orost `_. * Added :file:`fax3sm_winnt.c` to distribution list in :file:`Makefile.in`. * Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. Library changes --------------- * :file:`tif_fax3.c`: Fixed serious bug introduced during the ``uint16->uint32`` conversion for the run arrays. * Set :c:member:`td_sampleformat` default to :c:macro:`SAMPLEFORMAT_UINT` instead of :c:macro:`SAMPLEFORMAT_VOID` in :c:func:`TIFFDefaultDirectory` in :file:`tif_dir.c`. * Added "GetDefaulted" support for :c:macro:`TIFFTAG_SAMPLEFORMAT` in :file:`tif_aux.c`. * Patched :file:`tif_fax3.c` so that ``dsp->runs`` is allocated a bit bigger to avoid overruns encountered with :file:`frle_bug.tif`. * Modified :file:`tif_unix.c` to support 2-4GB seeks if :c:macro:`USE_64BIT_API` is set to 1, and added default (off) setting in :file:`tiffconf.h`. This should eventually be set by the configure script somehow. The original work on all these 2-4GB changes was done by `Peter Smith `_. * Modified :file:`tif_win32.c` to support 2-4GB seeks. * tentatively changed :c:type:`toff_t` to be unsigned instead of signed to facilitate support for 2-4GB files. * Updated a variety of files to use :c:type:`toff_t`. Fixed some mixups between :c:type:`toff_t` and :c:type:`tsize_t`. * Set :c:member:`tif_rawdatasize` to zero when freeing raw data buffer in :c:func:`TIFFWriteDirectory`. * Enabled :c:macro:`REWRITE_HACK` in :file:`tif_write.c` by default. * Fix bug in :file:`tif_write.c` when switching between reading one directory and writing to another. * Made :c:func:`TIFFWriteCheck` public, and added :c:func:`TIFFCreateDirectory` * Added :doc:`/functions/TIFFmemory` functions to :file:`libtiff.def`. * Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. Tools changes ------------- * :program:`fax2ps`: * Fixed mixup of width and height in bounding box statement as per submission by `Nalin Dahyabhai `_. * Modified :c:var:`printruns` to take :c:type:`uint32` instead of :c:type:`uint16`. Patch courtesy of `Bernt Herd `_. * Largely reimplemented :file:`contrib/addtiffo` to avoid temp files, updating the TIFF file in place. Fixed a few other bugs to. * Altered descriptions in tools to reflect "by default" lzw not supported LZW compression kit changes --------------------------- * created :file:`mangle-src.sh` -- sed scripts to munge src into LZW enabled format. Thanks to `Stanislav Brabec `_. * created :file:`Makefile` * merged :file:`tif_dir.c` with current source. * Created lzw compression kit, as a new CVS module (``libtiff-lzw-compression-kit``). * Updated :file:`index.html` to note lzw compression kit. Changes in TIFF v3.5.6beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.6beta (no release tag) Previous Version :doc:`v3.5.5 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * Added ``GNULDdso`` target and switched linux and freebsd to use it. * :file:`tools/Makefile.in`: Modified to install properly on SGI. * :file:`configure`: Fixed DSO test for Linux as per patch from `Jan Van Buggenhout `_. Library changes --------------- * :file:`tif_dir.c`: Clear :c:macro:`TIFF_ISTILED` flag in :c:macro:`TIFFDefaultDirectory` as per :bugzilla-rs:`18` from ``_. * Modified :file:`tif_packbits.c` decoding to avoid overrunning the output buffer, and to issue a warning if data needs to be discarded. See :bugzilla-rs:`18` * Modified :c:func:`TIFFClientOpen` to emit an error on an attempt to open a compressed file for update (``O_RDWR``/"``r+``") access. This is because the compressor/decompressor code gets very confused when the mode is ``O_RDWR``, assuming this means writing only. See bug :bugzilla-rs:`13` * Applied patch for 0x0000 sequences in :file:`tif_fax3.h` definition of :c:macro:`EXPAND1D` as per bug :bugzilla-rs:`11` (from Roman). * Fixed :file:`tiffcomp.h` to avoid win32 stuff if unix ``#defined``, to improve cygwin compatibility. * Applied patch from Roman Shpount to :file:`tif_fax3.c`. This seems to be a proper fix to the buffer sizing problem. See :bugzilla-rs:`11` * Fixed :file:`tif_getimage.c` to fix overrun bug with YCbCr images without downsampling. :bugzilla-rs:`10` Thanks to `Nick Lamb `_ for reporting the bug and proving the patch. * Fixed :file:`tif_jpeg.c` to avoid destroying the decompressor before we are done access data thanks to bug report from: `Michael Eckstein `_. * :file:`tif_open.c`: Don't set ``MMAP`` for ``O_RDWR`` files. * :file:`tif_open.c`: Set :c:macro:`STRIPCHOP_DEFAULT` for ``O_RDWR`` as well as ``O_RDONLY`` so that files opened for update can be strip chopped too. * :file:`tif_read.c`: fixed up bug with files missing rowsperstrip and the strips per separation fix done a few weeks ago. * Tentatively added support for :c:macro:`SAMPLEFORMAT_COMPLEXIEEEFP`, and :c:macro:`SAMPLEFORMAT_COMPLEXINT`. * :file:`index.html`, :file:`bugs.html`: added bugzilla info. * :file:`tif_read.c`: fix subtle bug with determining the number of rows for strips that are the last strip in a separation but not the last strip of all in :c:func:`TIFFReadEncodedStrip`. * Applied 16/32 bit fix to :file:`tif_fax3.c`. Fix supplied by `Peter Skarpetis `_. * Modified :file:`tiffio.h` logic with regard to including :file:`windows.h`. It won't include it when building with :c:macro:`__CYGWIN__`. * :file:`README`: update to mention {REDACTED - defunct web site}, don't list Sam's old email address. * :file:`libtiff/tif_dirread.c`: Don't use estimate strip byte count for one tile/strip images with an offset, and byte count of zero. These could be "unpopulated" images. * :file:`tif_win32.c`: Applied patch to fix overreads and ovverwrites caught by BoundsChecker. From `Arvan Pritchard `_ (untested). * :file:`tif_getimage.c`: Applied patch to silence VC6 warnings. From `Arvan Pritchard `__. * :file:`tif_lzw.c`: Applied patch to silence VC6 warnings. From `Arvan Pritchard `__. * :file:`libtiff/tif_apple.c`: Applied "Carbon" support patches supplied by `Leonard Rosenthol `_. May interfere with correct building on older systems. If so, please let me know. Tools changes ------------- * :file:`tools/rgb2ycbcr.c`: fixed output strip size to account for vertical roundup if rows_per_strip not a multiple of vertical sample size. * :file:`tools/tiffsplit.c`: Copy :c:macro:`TIFFTAG_SAMPLEFORMAT`. * Modified :program:`tiff2bw` to ensure portions add to 100%, and that white is properly recovered. See bug :bugzilla-rs:`15` Patch c/o `Stanislav Brabec `_ Contributed software changes ---------------------------- * :file:`contrib/addtiffo`: Added "averaging" resampling option. * Added :file:`contrib/stream` (stream io) code submitted by Avi Bleiweiss. LZW compression kit changes --------------------------- * updated :file:`tif_dir.c` to reflect changes to no-lzw :file:`tif_dir.c`. Changes in TIFF v3.5.7 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.5.7 (:tag:`Release-v3-5-7`) Previous Version :doc:`v3.5.6beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Software configuration changes ------------------------------ * :file:`libtiff/libtiff.def`: Brent Roman submitted new version adding several missing entry points. Also add a few other entry points later. * :file:`configure`, :file:`Makefile.in`, etc: added support for ``OPTIMIZER`` being set from :file:`config.site`. * :file:`config.guess`: updated wholesale to an FSF version apparently from 1998 (as opposed to 1994). This is mainly inspired by providing for MacOS X support. * :file:`configure/config.site`: modified to check if ``-lm`` is needed for ``MACHDEPLIBS`` if not supplied by :file:`config.site`. Needed for Darwin. * :file:`libtiff/tiff.h`: Applied hack to try and resolve the problem with the :file:`inttypes.h` include file on AIX. (bug :bugzilla-rs:`39`) * :file:`configure`, :file:`*Makefile.in`: Various changes to improve configuration for HP/UX specifically, and also in general. (bug :bugzilla-rs:`40`) They include: * Try to handle :program:`/usr/bin/sh` instead of :program:`/bin/sh` where necessary. * Upgrade to HP/UX 10.x+ compiler, linker and dso options. * Fixed :c:func:`mmap` test to avoid ``MMAP_FIXED`` ... it isn't available on HP * Use ``-${MAKEFLAGS}`` in sub makes from makefiles. * Fixed ``SCRIPT_SH``/``SHELL`` handling. * :file:`configure`: Changes for DSO generation on AIX provided by `John Marquart `_. * :file:`configure`, :file:`libtiff/Makefile.in`: Modified to build DSOs properly on Darwin thanks to `Robert Krajewski `_ and `Keisuke Fujii `_. * :file:`configure`, :file:`libtiff/Makefile.in`: applied OpenBSD patches as per bug :bugzilla-rs:`61`. * :file:`Makefile.in`: added ``DESTDIR`` support as per bug :bugzilla-rs:`60`. * :file:`libtiff/tif_jpeg.c`: Define :c:macro:`HAVE_BOOLEAN` on windows if :file:`RPCNDR.H` has been included. * :file:`man/Makefile.in`: add :c:func:`TIFFClientOpen` link as per debian submitted bug :bugzilla-rs:`66`. * :file:`libtiff/Makefile.in`: Fixed ``@DSOSUB_VERSION`` to be ``@DSOSUF_VERSION@`` in two places. Library changes --------------- * :file:`tif_fax3.c`: keep :c:var:`rw_mode` flag internal to fax3 state to remember whether we are encoding or decoding. This is to ensure graceful recovery if :c:func:`TIFFClientOpen` discovers an attempt to open a compressed file for "``r+``" access, and subsequently close it, as it resets the :c:member:`tif_mode` flag to ``O_RDONLY`` in this case to avoid writes, confusing the compressor's concept of whether it is in encode or decode mode. * :file:`tif_luv.c`, :file:`tiff.h`, :file:`tiffio.h`: New version of TIFF LogLuv (SGILOG) modules contributed by `Greg Ward `_. He writes: * I improved the gamut-mapping function in :file:`tif_luv.c` for imaginary colors, because some images were being super-saturated on the input side and this resulted in some strange color shifts in the output. * I added a psuedotag in :file:`tiff.h` to control random dithering during LogLuv encoding. This is turned off by default for 32-bit LogLuv and on for 24-bit LogLuv output. Dithering improves the average color accuracy over the image. * I added a ``#define`` for :c:macro:`LOG_LUV_PUBLIC`, which is enabled by default in :file:`tiffio.h`, to expose internal routines for converting between LogLuv and XYZ coordinates. This is helpful for writing more efficient, specialized conversion routines, especially for reading LogLuv files. * :file:`libtiff/tif_dirinfo.c`: don't declare :c:var:`tiffFieldInfo` static on VMS. * Added :c:macro:`TIFFTAG_COPYRIGHT` support. * :file:`tif_getimage.c`: Added support for 16bit minisblack/miniswhite images in RGBA interface. * :file:`libtiff/tif_dirinfo.c`: removed duplicate :c:macro:`TIFFTAG_PHOTOSHOP` as per bug :bugzilla-rs:`44`. * :file:`libtiff/tif_dirwrite.c`: Added support for :c:enumerator:`TIFF_VARIABLE2` in the case of writing :c:enumerator:`TIFF_BYTE`/:c:enumerator:`TIFF_SBYTE` fields as per bug :bugzilla-rs:`43`. * :file:`libtiff/tif_dirinfo.c`: Modified the :c:enumerator:`TIFF_BYTE` definition for :c:macro:`TIFFTAG_PHOTOSHOP` to use a writecount of :c:enumerator:`TIFF_VARIABLE2` (-3) to force use of :c:type:`uint32` counts instead of :c:expr:`short` counts. * :file:`libtiff/tif_dirinfo.c`: moved pixar and copyright flags to ensure everything is in order. * Integrated experimental OJPEG support from Scott Marovich of HP. * :file:`libtiff/tif_open.c`: Seek back to zero after failed read, before writing header. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: added check for :c:macro:`__LP64__` when checking for 64 bit architectures as per bugzilla bug :bugzilla-rs:`67`. * :file:`libtiff/tif_getimage.c`: Use :c:func:`memmove` instead of :c:func:`TIFFmemcpy` in :c:func:`TIFFReadRGBATile` to avoid issues in cases of overlapping buffers. See bug :bugzilla-rs:`69` in Bugzilla. * :file:`libtiff/tif_getimage.c`: Don't complain for CMYK (separated) images with more than four samples per pixel as per bug :bugzilla-rs:`73`. * :file:`libtiff/tif_getimage.c`: relax handling of contig case where there are extra samples that are supposed to be ignored as per bug :bugzilla-rs:`75`. This should now work for 8bit greyscale or paletted images. * :file:`libtiff/tif_packbits.c`: fixed memory overrun error as per bug :bugzilla-rs:`77`. * :file:`libtiff/tif_getimage.c`: Fixed problem with reading strips or tiles that don't start on a tile boundary. Fix contributed by Josep Vallverdu (from HP), and further described in bug :bugzilla-rs:`47`. * :file:`libtif/tif_fax3.c`: Removed ``#ifdef PURIFY`` logic, and modified to always use the "safe" version, even if there is a very slight cost in performance as per bug :bugzilla-rs:`54`. * :file:`libtiff/tif_lzw.c`: added dummy :c:func:`LZWSetupEncode` to report an error about LZW not being available. * :file:`libtiff/tif_dir.c`: propagate failure to initialize compression back from :c:func:`TIFFSetField` as an error status, so applications can detect failure. * :file:`libtiff/tif_lzw.c`: Avoid MS VC++ 5.0 optimization bug as per bug :bugzilla-rs:`78`. * :file:`libtiff/tif_dirwrite.c`: added :c:func:`TIFFRewriteDirectory` function. Updated :c:func:`TIFFWriteDirectory` man page to include :c:func:`TIFFRewriteDirectory`. * :file:`libtiff/tiff.h`: I have created :c:macro:`COMPRESSION_CCITT_T4`, :c:macro:`COMPRESSION_CCITT_T6`, :c:macro:`TIFFTAG_T4OPTIONS` and :c:macro:`TIFFTAG_T6OPTIONS` aliases in keeping with TIFF 6.0 standard in :file:`tiff.h` as per bug :bugzilla-rs:`83`. * Added :c:macro:`PHOTOMETRIC_ITULAB` as per bug :bugzilla-rs:`90`. Tools changes ------------- * Brent Roman contributed updated :program:`tiffcp` utility (and :file:`tiffcp.1`) with support for extracting subimages with the ``,n`` syntax, and also adding the "``-b``" bias removal flag. * :file:`tiff2ps.c`, :file:`tiff2ps.1`: Substantial changes to :program:`tiff2ps` by Bruce A. Mallett, including a faster encoder, fixes for level 2 PostScript, and support for the imagemask operator. * fax2ps.c: Helge (libtiff at oldach.net) submitted fix that corrects behaviour for non-Letter paper sizes. (bug :bugzilla-rs:`35`) It fixes two problems: Without scaling ("``-S``") the fax is now centered on the page size specified with "``-H``" and/or "``-W``". Before, :program:`fax2ps` was using an obscure and practically useless algorithm to allocate the image relative to Letter sized paper which sometime sled to useless whitespace on the paper, while at the same time cutting of the faxes printable area at the opposite border. Second, scaling now preserves aspect ratio, which makes unusual faxes (in particular short ones) print properly. * :file:`thumbnail.c`: changed default output compression to packbits from LZW since LZW isn't generally available. * :file:`tiff2rgba.c`: added "``-n``" flag to avoid emitting alpha component. Also added a man page for :program:`tiff2rgba`. * :file:`tiffcmp.c`: Fixed multi samples per pixel support for :c:func:`ContigCompare` as per bug :bugzilla-rs:`53`. Updated bug section of tiffcmp.1 to note tiled file issues. * :file:`libtiff/tif_getimage.c`: Fixed so that failure is properly reported by :c:func:`gtTileContig`, :c:func:`gtStripContig`, :c:func:`gtTileSeparate` and :c:func:`gtStripSeparate` as per bug :bugzilla-rs:`51`. Contributed software changes ---------------------------- * Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c` and :file:`contrib/addtiffo/tif_ovrcache.h`. LZW compression kit changes --------------------------- * Rewrote lzw patching process so that is required to enable full LZW support is to drop the :file:`tif_lzw.c` from the ``libtiff-lzw-compression-kit`` over the one in the libtiff directory. * Some changes were made to make recovery from failure to initialize the LZW compressor more graceful. * Note that as distributed libtiff support LZW decompression, but not LZW compression. Changes in TIFF v3.6.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.6.0 (:tag:`Release-v3-6-0`) Previous Version :doc:`v3.5.7 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * New utility :program:`raw2tiff` for converting raw rasters into TIFF files. * Lots of new :program:`tiff2ps` options. * Lots of new :program:`fax2tiff` options. * Lots of bug fixes for LZW, JPEG and OJPEG compression. Custom Tag Support ^^^^^^^^^^^^^^^^^^ The approach to extending libtiff with custom tags has changed radically. Previously, all internally supported TIFF tags had a place in the private :c:struct:`TIFFDirectory` structure within libtiff to hold the values (if read), and a "field number" (ie. :c:macro:`FIELD_SUBFILETYPE`) used to identify that tag. However, every time a new tag was added to the core, the size of the :c:struct:`TIFFDirectory` structure would change, breaking any dynamically linked software that used the private data structures. Also, any tag not recognised by libtiff would not be read and accessible to applications without some fairly complicated work on the applications part to pre-register the tags as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on libtiff. Among other things this approach required the extension code to access the private libtiff structures ... which made the higher level non-libtiff code be locked into a specific version of libtiff at compile time. This caused no end of bug reports! The new approach is for libtiff to read all tags from TIFF files. Those that aren't recognised as "core tags" (those having an associated ``FIELD_`` value, and place for storage in the :c:struct:`TIFFDirectory` structure) are now read into a dynamic list of extra tags (:c:member:`td_customValues` in :c:struct:`TIFFDirectory`). When a new tag code is encountered for the first time in a given TIFF file, a new anonymous tag definition is created for the tag in the tag definition list. The type, and some other metadata is worked out from the instance encountered. These fields are known as "custom tags". Custom tags can be set and fetched normally using :c:func:`TIFFSetField` and :c:func:`TIFFGetField`, and appear pretty much like normal tags to application code. However, they have no impact on internal libtiff processing (such as compression). Some utilities, such as :program:`tiffcp` will now copy these custom tags to the new output files. As well as the internal work with custom tags, new C API entry points were added so that extension libraries, such as libgeotiff, could define new tags more easily without accessing internal data structures. Because tag handling of extension tags is done via the "custom fields" mechanism as well, the definition provided externally mostly serves to provide a meaningful name for the tag. The addition of "custom tags" and the altered approach to extending libtiff with externally defined tags is the primary reason for the shift to the 3.6.x version number from 3.5.x. Software configuration changes ------------------------------ * :file:`configure`, :file:`config.site`: Fix for large files (>2GiB) support. New option in the config.site: ``LARGEFILE="yes"``. Should be enough for the large files I/O. * :file:`configure`: Set ``-DPIXARLOG_SUPPORT`` option along with ``-DZIP_SUPPORT``. * :file:`html/Makefile.in`: Updated to use :program:`groffhtml` for generating html pages from man pages. * :file:`configure`, :file:`libtiff/Makefile.in`: Added SCO OpenServer 5.0.6 support from John H. DuBois III. * :file:`libtiff/Makefile.vc`, :file:`libtiff/libtiff.def`: Missed declarations added. * :file:`libtiff/Makefile.in`, :file:`tools/Makefile.in`: Shared library will not be stripped when installing, utility binaries will do be stripped. As per bug :bugzilla-rs:`93`. * :file:`man/Makefile.in`: Patch ``DESTDIR`` handling as per bug :bugzilla-rs:`95`. * :file:`configure`: OpenBSD changes for Sparc64 and DSO version as per bug :bugzilla-rs:`96`. * :file:`config.site/configure`: added support for ``OJPEG=yes`` option to enable OJPEG support from :file:`config.site`. * :file:`config.gues`, :file:`config.sub`: Updated from ``_. * :file:`configure`: Modify ``CheckForBigEndian`` so it can work in a cross compiled situation. * :file:`configure`, :file:`libtiff/Makefile.in`: Changes for building on MacOS 10.1 as per bug :bugzilla-rs:`94`. * :file:`html/Makefile.in`: added missing images per bug :bugzilla-rs:`92`. * :file:`port/Makefile.in`: fixed clean target per bug :bugzilla-rs:`92`. Library changes --------------- * :file:`libtiff/tif_getimage.c`: New function :c:func:`TIFFReadRGBAImageOriented` implemented to retrieve raster array with user-specified origin position. * :file:`libtiff/tif_fax3.c`: Fix wrong line numbering. * :file:`libtiff/tif_dirread.c`: Check field counter against number of fields. * Store a list of opened IFD to prevent directory looping. * :file:`libtiff/tif_jpeg.c`: modified segment_height calculation to always be a full height tile for tiled images. Also changed error to just be a warning. * :file:`libtiff/tif_lzw.c`: fixed so that decoder state isn't allocated till :c:func:`LZWSetupDecode`. Needed to read LZW files in "``r+``" mode. * :file:`libtiff/tif_dir.c`: fixed up the :c:member:`tif_postdecode` settings responsible for byte swapping complex image data. * :file:`libtiff/tif_open.c`: Removed error if opening a compressed file in update mode bug (:bugzilla-rs:`198`). * :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteCheck` now fails if the image is a pre-existing compressed image. That is, image writing to pre-existing compressed images is not allowed. * :file:`html/man/*.html`: Web pages regenerated from man pages. * :file:`libtiff/tif_jpeg.c`: Hack to ensure that "boolean" is defined properly on Windows so as to avoid the structure size mismatch error from libjpeg (bug :bugzilla-rs:`188`). * :file:`libtiff/tiff.h`: ``#ifdef USING_VISUALAGE`` around previous Visual Age AIX porting hack as it screwed up gcc. (bug :bugzilla-rs:`39`) * :file:`libtiff/tiff.h`: added :c:macro:`COMPRESSION_JP2000` (34712) for LEAD tools custom compression. * :file:`libtiff/tif_dirread.c`: Another fix for the fetching ``SBYTE`` arrays by the :c:func:`TIFFFetchByteArray` function. (bug :bugzilla-rs:`52`) * :file:`libtiff/tif_dirread.c`: Expand ``v[2]`` to ``v[4]`` in :c:func:`TIFFFetchShortPair` as per bug :bugzilla-rs:`196`. * :file:`libtiff/tif_lzw.c`: Additional consistency checking added in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` fixing bugs :bugzilla-rs:`190` and :bugzilla-rs:`100`. * :file:`libtiff/tif_lzw.c`: Added check for valid code lengths in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat`. Fixes bug :bugzilla-rs:`115`. * :file:`tif_getimage.c`: Ensure that :c:func:`TIFFRGBAImageBegin` returns the return code from the underlying pick function as per bug :bugzilla-rs:`177`. * :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`, :file:`libtiff/tif_print.c`: Hacked :file:`tif_jpeg.c` to fetch :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` from the jpeg data stream if it isn't present in the tiff tags as per bug :bugzilla-rs:`168`. * :file:`libtiff/tif_jpeg.c`: Fixed problem with setting of :c:var:`nrows` in :c:func:`JPEGDecode` as per bug :bugzilla-rs:`129`. * :file:`libtiff/tif_read.c`, :file:`libtiff/tif_write.c`: :c:func:`TIFFReadScanline` and :c:func:`TIFFWriteScanline` now set :c:member:`tif_row` explicitly in case the codec has fooled with the value as per bug :bugzilla-rs:`129`. * :file:`libtiff/tif_ojpeg.c`: Major upgrade from Scott. Details in bug :bugzilla-rs:`156`. * :file:`libtiff/tif_open.c`: Pointers to custom procedures in :c:func:`TIFFClientOpen` are checked to be not :c:macro:`NULL` pointers. * :file:`libtiff/tif_lzw.c`: Assertions in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` replaced by warnings. Now libtiff should read corrupted LZW-compressed files by skipping bad strips as per bug :bugzilla-rs:`100`. * :file:`libtiff/tif_dirwrite.c`, :file:`libtiff/tif_write.c`, :file:`libtiff/tiffio.h`: :c:func:`TIFFCheckpointDirectory` routine added as per bug :bugzilla-rs:`124`. The :doc:`/functions/TIFFWriteDirectory` man page discusses this new function as well as the related :c:func:`TIFFRewriteDirectory`. * :file:`libtiff/tif_codec.c`, :file:`libtiff/tif_compress.c`, :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_getimage.c`: Introduced additional members ``tif->tif_decodestatus`` and ``tif->tif_encodestatus`` for correct handling of unconfigured codecs (we should not try to read data or to define data size without correct codecs). See bug :bugzilla-rs:`119`. * :file:`tif_dirread.c`: avoid div-by-zero if :c:var:`rowbytes` is zero in chop func as per bug :bugzilla-rs:`111`. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: Dwight Kelly added get/put code for new tag ``XMLPACKET`` as defined in Adobe XMP Technote. Added missing ``INKSET`` tag value from TIFF 6.0 spec ``INKSET_MULTIINK`` (=2). Added missing tags from Adobe TIFF technotes: ``CLIPPATH``, ``XCLIPPATHUNITS``, ``YCLIPPATHUNITS``, ``OPIIMAGEID``, ``OPIPROXY`` and ``INDEXED``. Added ``PHOTOMETRIC`` tag value from TIFF technote 4 ``ICCLAB`` (=9). * :file:`libtiff/tif_getimage.c`: Additional check for supported codecs added in :c:func:`TIFFRGBAImageOK`, :c:func:`TIFFReadRGBAImage`, :c:func:`TIFFReadRGBAStrip` and :c:func:`TIFFReadRGBATile` now use :c:func:`TIFFRGBAImageOK` before reading a per bug :bugzilla-rs:`110`. * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: Added routine :c:func:`TIFFDataWidth` for determining :c:enum:`TIFFDataType` sizes instead of working with :c:var:`tiffDataWidth` array directly as per bug :bugzilla-rs:`109`. * :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirwrite.c`: Added possibility to read broken TIFFs with ``LONG`` type used for :c:macro:`TIFFTAG_COMPRESSION`, :c:macro:`TIFFTAG_BITSPERSAMPLE`, :c:macro:`TIFFTAG_PHOTOMETRIC` as per bug :bugzilla-rs:`99`. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: Add support for :c:macro:``__arch64__`` as per bug :bugzilla-rs:`94`. * :file:`libtiff/tif_read.c`: Fixed :c:func:`TIFFReadEncodedStrip` to fail if the decodestrip function returns anything not greater than zero as per bug :bugzilla-rs:`97`. * :file:`libtiff/tif_jpeg.c`: fixed computation of :c:var:`segment_width` for tiled files to avoid error about it not matching the ``cinfo.d.image_width`` values ("JPEGPreDecode: Improper JPEG strip/tile size.") for ITIFF files. Apparently the problem was incorporated since 3.5.5, presumably during the OJPEG/JPEG work recently. * :file:`libtiff/tif_getimage.c`: If :c:macro:`DEFAULT_EXTRASAMPLE_AS_ALPHA` is 1 (defined in :file:`tiffconf.h` - 1 by default) then the RGBA interface will assume that a fourth extra sample is ``ASSOCALPHA`` if the ``EXTRASAMPLE`` value isn't set for it. This changes the behaviour of the library, but makes it work better with RGBA files produced by lots of applications that don't mark the alpha values properly. As per bugs :bugzilla-rs:`93` and :bugzilla-rs:`65`. * :file:`libtiff/tif_jpeg.c`: allow jpeg data stream sampling values to override those from tiff directory. This makes this work with ImageGear generated files. Tools changes ------------- * :program:`tiff2ps`: * Added page size setting when creating PS Level 2. * Fixed PS comment emitted when FlateDecode is being used. * :program:`tiffsplit`: increased the maximum number of pages that can be split. * :program:`raw2tiff`: * New utility for turning raw raster images into TIFF files written by Andrey Kiselev. * Added option "``-p``" to explicitly select color space of input image data. * :program:`tiffmedian`: Support for large (> 2GB) images. * :program:`ppm2tiff`: Fixed possible endless loop. * :program:`tiff2rgba`: Switched to use :c:func:TIFFReadRGBAImageOriented instead of :c:func:`TIFFReadRGBAImage`. * :program:`tiffcmp`: Fixed problem with unused data comparing (bug :bugzilla-rs:`349`). "``-z``" option now can be used to set the number of reported different bytes. * :program:`tiffcp`: * Added possibility to specify value -1 to "``-r``" option to get the entire image as one strip (bug :bugzilla-rs:`343`). * Set the correct ``RowsPerStrip`` and ``PageNumber`` values (bug :bugzilla-rs:`343`). * Fixed problem with colorspace conversion for JPEG encoded images (bugs :bugzilla-rs:`23` and :bugzilla-rs:`275`) * Added support for ``Orientation`` tag. * :program:`fax2tiff`: * Page numbering fixed (bug :bugzilla-rs:`341`). * Applied patch from Julien Gaulmin. More switches for :program:`fax2tiff` tool for better control of input and output (bugs :bugzilla-rs:`272` and :bugzilla-rs:`293`). * Updated to reflect latest changes in libtiff per bug :bugzilla-rs:`125`. * :program:`ppm2tiff`: PPM header parser improved: now able to skip comments. * :program:`tiff2ps`: * Sebastian Eken provided patches (bug :bugzilla-rs:`200`) to add new these new switches: "``-b #``": for a bottom margin of # inches "``-c``": center image "``-l #``": for a left margin of # inches "``-r``": rotate the image by 180 degrees Also, new features merged with code for shrinking/overlapping. * Force deadzone printing when EPS output specified (bug :bugzilla-rs:`325`). * Add ability to generate PS Level 3. It basically allows one to use the ``/flateDecode`` filter for ZIP compressed TIFF images. Patch supplied by Tom Kacvinsky (bug :bugzilla-rs:`328`). * Don't emit ``BeginData``/``EndData`` DSC comments since we are unable to properly include the amount to skip as per bug :bugzilla-rs:`80`. * Added workaround for some software that may crash when last strip of image contains fewer number of scanlines than specified by the ``/Height`` variable as per bug :bugzilla-rs:`164`. * Patch from John Williams to add new functionality for splitting long images in several pages as per bug :bugzilla-rs:`142`. New switches: "``-H #``": split image if height is more than # inches "``-L #``": overLap split images by # inches * New commandline switches to override resolution units obtained from the input file per bug :bugzilla-rs:`131`: "``-x``": override resolution units as centimeters "``-y``": override resolution units as inches * tiff2ps: Division by zero fixed as per bug :bugzilla-rs:`88`. * :program:`tiffdump`: include :c:macro:`TIFFTAG_JPEGTABLES` in tag list. * :program:`tiffset`: fix bug in error reporting. Contributed software changes ---------------------------- * Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c`, :file:`contrib/addtiffo/tif_ovrcache.h`. * :file:`libtiff/contrib/win95`: renamed to :file:`contrib/win_dib`. Added new :file:`Tiffile.cpp` example of converting TIFF files into a DIB on Win32 as per bug :bugzilla-rs:`143`. LZW compression kit changes --------------------------- * LZW compression kit synchronized with actual libtiff version. Changes in TIFF v3.6.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.6.1 (:tag:`Release-v3-6-1`) Previous Version :doc:`v3.6.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * New utility :program:`tiff2pdf` for converting TIFF images directly into PDF. * New :doc:`/functions/TIFFcolor` color conversion module. * Full support for ``Orientation`` tag in ``TIFFRGBAImage`` interface. * Many bugs fixed. Software configuration changes ------------------------------ * :file:`libtiff/makefile.vc`, :file:`tools/makefile.vc`: Support for IJG JPEG library. * :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. * :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. * :file:`libtiff/tiffcomp.h`: ``#define _BSDTYPES_DEFINED`` when defining BSD typedefs. * :file:`configure`, :file:`libtiff/Makefile.in`, :file:`libtiff/mkversion.c`: Relative buildings fixed. * :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. Library changes --------------- * :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: Added support for ``ReferenceBlackWhite`` tag handling when converted from YCbCr color space as per bug :bugzilla-rs:`120`. * :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_aux.c`: Read ``WhitePoint`` tag from the file and properly use it for CIE Lab 1976 to RGB transform. * :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: Finally resolved problems with orientation handling. ``TIFFRGBAImage`` interface now properly supports all possible orientations, i.e. images will be flipped both in horizontal and vertical directions if required. 'Known bugs' section now removed from the appropriate manual pages. * :file:`libtiff/tif_luv.c`: Fixed bug in 48-bit to 24-bit conversion routine, reported by Antonio Scuri. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_codec.c`: Added new function :c:func:`TIFFIsCODECConfigured`, suggested by Ross Finlayson. * :file:`libtiff/tif_ojpeg.c`: :c:func:`TIFFVGetField` function now can properly extract the fields from the OJPEG files. Patch supplied by Ross Finlayson. * :file:`libtiff/tif_dir.h`: :c:func:`_TIFFFindOrRegisterdInfo` declaration replaced with :c:func:`_TIFFFindOrRegisterFieldInfo` as reported by Ross Finlayson. * :file:`libtiff/tif_dirinfo.c`: Implemented binary search in :c:func:`_TIFFMergeFieldInfo`. Patch supplied by Ross Finlayson. * :file:`tif_dirread.c`: do not mark all anonymously defined tags to be ``IGNORE`` (as it was done in 3.6.0). * :file:`libtiff/tiff.h`, :file:`libtiff/tif_dirinfo.c`: Added support for IFD (13) datatype, introduced in "Adobe PageMaker TIFF Technical Notes". * :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: New color space conversion code: CIE L*a*b* 1976 images now supported by the ``TIFFRGBAImage`` interface. YCbCr to RGB conversion code also moved there and now has :doc:`/functions/TIFFcolor` publicly available interface. These routines currently used in ``TIFFRGBAImage`` interface only and not supported in other libtiff tools yet. So if you want, for example, to convert CIE Lab image into PostScript file you should do it in two steps: change colorspace to RGB using :program:`tiff2rgba` utility and then process it with the :program:`tiff2ps`. * :file:`libtiff/tif_tile.c`: Remove spurious use of "s" (sample) in the ``planarconfig_contig`` case in :c:func:`TIFFComputeTile` as per bug :bugzilla-rs:`387`. * :file:`libtiff/tiffiop.h`: New macros: :c:macro:`TIFFmax` and :c:macro:`TIFFmin`. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_strip.c`: Added :c:func:`TIFFRawStripSize` function as suggested by Chris Hanson. * :file:`libtiff/tif_lzw.c`, :file:`libtiff/tif_fax3.c`: Proper support for update mode as per bug :bugzilla-rs:`424`. Tools changes ------------- * :program:`tiff2pdf`:: New tool, written by Ross Finlayson, to directly convert TIFF files to PDF. * :program:`tiffgt`: Unmaintained and platform dependent sgigt utility removed and replaced with the completely rewritten portable tool (depend on OpenGL and GLUT). This tool will not build by default. * :program:`ras2tiff`: Properly determine SUN Rasterfiles with the reverse byte order (it is reported by the magic header field). Problem reported by Andreas Wiesmann. * :program:`raw2tiff`: Implemented image size guessing using correlation coefficient calculation between two neighbour lines. Contributed software changes ---------------------------- * :file:`contrib/pds/tif_pdsdirread.c`, :file:`contrib/pds/tif_pdsdirwrite.c`: Use :c:func:`TIFFDataWidth` function instead of :c:var:`tiffDataWidth` array. LZW compression kit changes --------------------------- * Proper support for update mode as per bug :bugzilla-rs:`424`. Changes in TIFF v3.7.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0 (:tag:`Release-v3-7-0`) Previous Version :doc:`v3.7.0beta2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Several bugs found after 3.7.0beta2 release were fixed. Software configuration changes ------------------------------ * :file:`ltmain.sh`: Fix for MinGW compilation. Library changes --------------- * :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_luv.c`, :file:`libtiff/tif_ojpeg.c`, :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_write.c`: Handle the zero strip/tile sizes properly (Dmitry V. Levin, Marcus Meissner). * :file:`libtiff/tif_dirinfo.c`: Type of the :c:macro:`TIFFTAG_SUBIFD` field changed to :c:enumerator:`TIFF_IFD`. * Preliminary support for BigTIFF files: now libtiff can recognize and reject to open such images. ;-) * :file:`libtiff/tif_dir.c`: Initialize :c:member:`td_tilewidth` and :c:member:`td_tilelength` fields of the :c:struct:`TIFFDirectory` structure with the 0 instead of -1 to avoid confusing integer overflows in :c:func:`TIFFTileRowSize` for striped images. * :file:`libtiff/tif_dirinfo.c`: Fix bug with ``tif_foundfield`` and reallocation of ``tif_fieldinfo`` as per bug :bugzilla-rs:`630` * :file:`libtiff/tif_compress.c`: Improved error reporting in :c:func:`TIFFGetConfiguredCODECs` (Dmitry V. Levin). Tools changes ------------- * :file:`tiffcmp.c` (:c:func:`leof`): Renamed from "``eof``" in order to avoid conflict noticed under MinGW. * :file:`tiff2pdf.c`: Fixed ``TransferFunction`` tag handling reported by Ross A. Finlayson. Contributed software changes ---------------------------- * None. LZW compression kit changes --------------------------- * This one is not longer needed. Changes in TIFF v3.7.0alpha =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0alpha (:tag:`Release-v3-7-0-alpha`) Previous Version :doc:`v3.6.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Significant changes in software configuration: we are switched to GNU autotools now. * :program:`tiffset`: Set any libtiff supported tags. Tags can be supplied by the mnemonic name or number. Software configuration changes ------------------------------ * Get rid of the old configuration system and switch to GNU autotools. Library changes --------------- * :file:`libtiff/tif_ojpeg.c`: Fixed problem with duplicated ``SOI`` and ``SOF`` markers as per bug :bugzilla-rs:`581`. * :file:`libtiff/tif_open.c`, :file:`libtiff/tiffio.h`: New function added: :c:func:`TIFFIsBigEndian`. Function returns nonzero if given was file written in big-endian order. * :file:`libtiff/tif_print.c`: added (untested) support for printing ``SSHORT``, ``SLONG`` and ``SRATIONAL`` fields. * :file:`libtiff/tif_fax3.c`: Avoid reading CCITT compression options if compression type mismatches. See :bugzilla-rs:`565`. * :file:`libtiff/tif_strip.c`: Never return 0 from the :c:func:`TIFFNumberOfStrips`. * :file:`libtiff/tif_dirread.c`: Workaround for broken TIFF writers which store single ``SampleFormat`` value for multisampled images. See :bugzilla-rs:`562`. * :file:`libtiff/tif_write.c`: Allow in-place updating of the compressed images (don't work properly with all codecs). For details see GDAL bug :bugzilla-rs:`534`. * :file:`libtiff/tif_jpeg.c`: Workaround for wrong sampling factors used in the Intergarph JPEG compressed TIFF images as per bug: :bugzilla-rs:`532`. * :file:`libtiff/tif_open.c`: Use dummy :c:func:`mmap`/:c:func:`munmap` functions in :c:func:`TIFFClientOpen` when the appropriate client functions was not supplied by user. * :file:`libtiff/tif_dirread.c`: Fixed problem with handling :c:enumerator:`TIFF_UNDEFINED` tag type in :c:func:`TIFFFetchNormalTag` as per bug :bugzilla-rs:`508`. * :file:`libtiff/tif_codec.c`: Fixed typo in ``TIFFInitPackBits`` name as per: :bugzilla-rs:`494`. * :file:`libtiff/tif_fax3.c`: Fixed problem, introdiced in 3.6.1 release, with the CCITT encoding modes as per bug :bugzilla-rs:`483`. We need more work on fax codec to support update mode. * :file:`libtiff/tiff.h`: Fixed tag definitions for :c:macro:`TIFFTAG_YCLIPPATHUNITS` and :c:macro:`TIFFTAG_INDEXED` as per bug :bugzilla-rs:`475`. * :file:`libtiff/tif_win32.c`, :file:`libtiff/tif_unix.c`: Check whether the pointer is :c:macro:`NULL` before proceeding further as per bug :bugzilla-rs:`474`. Check results, returned by the :c:func:`TIFFFdOpen` before returning and close file if :c:func:`TIFFFdOpen` failed as per bug :bugzilla-rs:`468`. * :file:`libtiff/libtiff.def`, :file:`libtiff/tif_close.c`, :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: Separate :c:func:`TIFFCleanup` from the :c:func:`TIFFClose` in order to fix the bug :bugzilla-rs:`468`. * :file:`libtiff/tif_dirwrite.c`: Fixed handling of writable ASCII tags that are ``field_passcount=TRUE`` properly. Arguably anonymous custom tags should be declared as ``passcount=FALSE``, but I don't want to change that without a careful review. * :file:`libtiff/tif_write.c`: Fixed reporting size of the buffer in case of stripped image in :c:func:`TIFFWriteBufferSetup`. As per bug :bugzilla-rs:`460`. * :file:`libtiff/tif_dir.c`: Incomplete cleanup in :c:func:`TIFFFreeDirectory`, patch from Gerben Koopmans. * :file:`libtiff/tif_dirread.c`: Check :c:member:`field_passcount` value before setting the value of undefined type, patch from Gerben Koopmans. * :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: Fixes for AMD 64 platform as suggested by Jeremy C. Reed. * :file:`libtiff/tif_win32.c`: Fixed problem with :c:func:`_TIFFrealloc` when the :c:macro:`NULL` pointer passed. Patch supplied by Larry Grill. Tools changes ------------- * :program:`tiffset`: Set any libtiff supported tags. Tags can be supplied by the mnemonic name or number. * :file:`ycbcr.c`: fixed :c:func:`main` declaration as per: :bugzilla-rs:`513`. * :program:`tiffsplit`: Don't forget to copy ``PhotometricInterpretation`` tag. * :program:`tiffsplit`: * Fixed problem with unproperly written multibyte files. Now output files will be written using the same byte order flag as in the input image. See :bugzilla-rs:`574`. * Copy ``JPEGTables`` tag contents for JPEG compressed images. Reported by Artem Mirolubov. * :program:`tiffcp`: * Close output file on normal exit. * Don't emit warnings when ``Orientation`` tag does not present in the input image. * Properly set Photometric Interpretation in case of JPEG compression of grayscale images. * Fixed problem with wrong interpretation of the ``InkNames`` tag as per bug :bugzilla-rs:`466`. Memory leak fixed. * Fixed problem with wrong ``PhotometricInterpretation`` setting for non-RGB images. Contributed software changes ---------------------------- * Outdated stuff removed. * Almost all programs are synchronized with the current libtiff and should compile without problems. LZW compression kit changes --------------------------- * No changes. Changes in TIFF v3.7.0beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0beta (:tag:`Release-v3-7-0beta`) Previous Version :doc:`v3.7.0alpha ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * LZW compression enabled by default. You don't need the separate compression kit anymore. * :program:`bmp2tiff`: Added new utility to convert Windows BMP files into TIFFs. * The first attempt to implement a test suite. Software configuration changes ------------------------------ * Many portability fixes in the new autotooled build suite. Library changes --------------- * :file:`libtiff/tif_luv.c`, :file:`libtiff/tif_next.c`, :file:`libtiff/tif_thunder.c`: Several buffer overruns fixed, as noted by Chris Evans. * BSD data types (:c:type:`u_char`, :c:type:`u_short`, :c:type:`u_int`, :c:type:`u_long`) is no longer used internally in the libtiff. Should result in simpler configuration and better portability. * :file:`libtiff/tiff.h`: Fix column tagging. Reference current Adobe XMP specification. Reference libtiff bug tracking system to submit private tag additions. * :file:`libtiff/tif_dirread.c`: Don't reject to read tags of the ``SamplesPerPixel`` size when the tag count is greater than number of samples as per bug :bugzilla-rs:`576`. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: Applied patches from Joris Van Damme to avoid requirement for :file:`tiffiop.h` inclusion in some applications. Look for details here: ``_. * :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirinfo.c`: Fixed problem with the static variable as per bug :bugzilla-rs:`593`. * :file:`libtiff/tif_lzw.c`: LZW compression code is merged back from the separate package. All libtiff tools are updated to not advertise an absence of LZW support. * :file:`libtiff/tif_dir.c`: Call :c:func:`TIFFError` instead of producing warnings when setting custom tags by value. Reported by Eric Fieleke. Tools changes ------------- * :program:`tiff2ps`: Avoid zero division in :c:func:`setupPageState` function; properly initialize array in :c:func:`PSDataBW`. * :program:`tiff2pdf`: Multiple bugfixes. * :program:`ras2tiff`: Fixed issue with missed big-endian checks as per bug :bugzilla-rs:`586`. * :program:`bmp2tiff`: Added new utility to convert Windows BMP files into TIFFs. Contributed software changes ---------------------------- * No changes. LZW compression kit changes --------------------------- * This one is not longer needed. Changes in TIFF v3.7.0beta2 =========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.0beta2 (:tag:`Release-v3-7-0beta2`) Previous Version :doc:`v3.7.0beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * The code has been reviewed by Dmitry Levin: added checks for values, returned by the space allocation functions, fixed problems with the possible integer overflows. Software configuration changes ------------------------------ * Several fixes in the test suite. Library changes --------------- * Preliminary support for BigTIFF files: now libtiff can recognize and reject to open such images. ;-) * :file:`libtiff/tif_dirinfo.c`: changed type of XMLPacket (tag 700) to :c:enumerator:`TIFF_BYTE` instead of :c:enumerator:`TIFF_UNDEFINED` to comply with the info in the Adobe XMP Specification. * Added many checks for integer overflow and for successful space allocations in the different parts of library. Code review completed by Dmitry V. Levin. * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_compress.c`: Added :c:func:`TIFFGetConfiguredCODECs` function to get the list of configured codecs. Tools changes ------------- * :file:`tiff2bw`: Write ``ImageWidth``/``ImageHeight`` tags to output file, as noted by Gennady Khokhorin. Contributed software changes ---------------------------- * No changes. LZW compression kit changes --------------------------- * This one is not longer needed. Changes in TIFF v3.7.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.1 (:tag:`Release-v3-7-1`) Previous Version :doc:`v3.7.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * This is mostly bugfix release. Most important fix is the one related to wrong custom tag read/write code. Software configuration changes ------------------------------ * :file:`autogen.sh`: :program:`aclocal` and :program:`autoheader` should be executed after :program:`libtoolize`. Also add ``-I .`` to aclocal invocation to check current directory for macros. * nmake.opt: Link with the :file:`user32.lib` in windowed mode. As per bug :bugzilla-rs:`697` * :file:`nmake.opt`, :file:`makefile.vc`: make it easier to rename the libtiff DLL. * :file:`configure`, :file:`configure.ac`: Added ``--enable-rpath`` option to embed linker paths into library binary. Library changes --------------- * :file:`tiff.h`: Revert back libtiff data type definitions as per bug :bugzilla-rs:`687` * :file:`tif_dirread.c`: Do not forget about :c:macro:`TIFF_VARIABLE2` when checking for tag count in :c:func:`TIFFReadDirectory` function. As per bug :bugzilla-rs:`713` * :file:`tif_getimage.c`: Support for multiple-alpha-channelled RGB-images as per bug :bugzilla-rs:`718` * :file:`tif_getimage.c`: ``#define A1`` bracketing for clean build on SunPro compiler. * :file:`tif_dirwrite.c`: Always write :c:macro:`TIFFTAG_SUBIFD` using ``LONG`` type as per bugs :bugzilla-rs:`703` and :bugzilla-rs:`704`. * :file:`tif_win32.c`: Use :c:expr:`char*` strings instead of :c:type:`TCHAR` in windowed mode as per bug :bugzilla-rs:`697` * :file:`tif_dir.c`, :file:`tif_dirread.c`: Remove :c:func:`TIFFReassignTagToIgnore` call from the :c:func:`TIFFReadDirectory` function. :c:func:`TIFFReassignTagToIgnore` must be removed in the future, as it was never used properly. As per bug :bugzilla-rs:`692` * :file:`tif_jpeg.c`: Added a work-around in order to allow compilation with the heavily modified version of libjpeg delivered with Cygwin. * :file:`tif_dir.c`: Properly handle tags, which have the :c:type:`uint32` counts. As per bug :bugzilla-rs:`693` * :file:`tif_unix.c`: Make UNIX module compilable (and usable) on Windows. * :file:`tiff.h`: Added Adobe DNG tags. * :file:`tif_aux.c`: Set the appropriate ``ReferenceBlackWhite`` array for YCbCr image which lacks that tag (noted by Hans Petter Selasky). * :file:`tif_color.c`: Division by zero fixed (Hans Petter Selasky). * :file:`tif_stream.cxx`, :file:`tiffio.h`: Added C++ stream interface contributed by Edward Lam (see :bugzilla-rs:`654` for details). Those who want to use C++ streams should ``#include ``. * :file:`tif_open.c`: Removed :c:func:`close` in :c:func:`TIFFClientOpen` if file is bad. This is the callers responsibility. :bugzilla-rs:`651` * :file:`tiffio.h`, :file:`tif_win32.c`, :file:`libtiff.def`: Added :c:func:`TIFFOpenW` function to work with the double byte strings (used to represent filenames in some locales). As per bug :bugzilla-rs:`625` * :file:`tif_dirread.c`: Fixed problem when fetching ``BitsPerSample`` and ``Compression`` tags of type ``LONG`` from broken TIFFs as per bug :bugzilla-rs:`662` * :file:`tif_dirinfo.c`: Fixed definition for ``TIFFTAG_RICHTIFFIPTC``, the writecount should have :c:type:`uint32` type. As per bug :bugzilla-rs:`662` * :file:`tif_write.c`: Fixed wrong ``if()`` statement in :c:func:`TIFFAppendToStrip` function as per bug :bugzilla-rs:`660` * :file:`tif_dirinfo.c`: Change definition for ``TIFFTAG_EXTRASAMPLES`` field. The caller should supply a count when setting this field. As per bug :bugzilla-rs:`648`. * :file:`tif_jpeg.c`, :file:`tif_ojpeg.c`: ``TIFFTAG_JPEGTABLES`` should have uint32 count. Use this type everywhere. * :file:`tif_next.c`: avoid use of :c:type:`u_long` and :c:type:`u_char` types. * :file:`tif_fax3.c`: Fixed case with the wrong decode routines choosing when the incorrect ``Group4Options`` tag set. As per bug :bugzilla-rs:`323` * :file:`tif_dirwrite.c`: Fixed problem with passing count variable of wrong type when writing the :c:macro:`TIFF_BYTE`/:c:macro:`TIFF_SBYTE` tags in :c:func:`TIFFWriteNormalTag`. * :file:`tif_compress.c`: Zero division problem fixed (Vladimir Nadvornik, Dmitry V. Levin). Tools changes ------------- * :file:`fax2ps.c`: Be able to extract the first page (#0). As per bug :bugzilla-rs:`690` * :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Position`` tags (Tristan Hill). * :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Resolution`` tags (Peter Fales). * :file:`tiffset.c`: Check the :c:func:`malloc` return value (Dmitry V. Levin). Contributed software changes ---------------------------- * None. Changes in TIFF v3.7.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.2 (:tag:`Release-v3-7-2`) Previous Version :doc:`v3.7.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Maintenance release. Many bugfixes in the build environment and compatibility improvements. Software configuration changes ------------------------------ * :file:`configure.ac`: Use ``-rpath`` option instead of ``-R`` as per bug :bugzilla-rs:`732` * :file:`tif_stream.cxx`: Fixes for C++ stream interface from Michael Rinne and Edward Lam. * :file:`configure.ac`: Make the documentation directory location configurable via the ``--with-docdir`` option (as suggested by Jeremy C. Reed). * Place the C++ stream API in the separate library called ``libtiffxx`` to avoid unneeded dependencies. Probably there will be more C++ API in the future. As per bugs :bugzilla-rs:`733` and :bugzilla-rs:`730` * :file:`configure`, :file:`configure.ac`: Replace ``--disable-c++`` with the ``--disable-cxx`` option as per bug :bugzilla-rs:`730`. Library changes --------------- * Applied patch from Lee Howard to support a new tag ``TIFFTAG_FAXDCS`` (34911) used in HylaFax software. As per bug :bugzilla-rs:`771` * :file:`tif_open.c`: Remove unnecessary :c:func:`TIFFSeekFile` call as per bug :bugzilla-rs:`756` * :file:`tiff.h`: Changed the :c:type:`int8` definition to be always :c:expr:`signed char` as per bug :bugzilla-rs:`727` * :file:`tiffio.h`: Move :c:func:`TIFFOpenW` function into the ``extern "C"{}`` block as per bug :bugzilla-rs:`763` * :file:`tif_dirread.c`: Estimate strip size in case of wrong or suspicious values in the tags. As per bugs :bugzilla-rs:`705` and :bugzilla-rs:`320` * :file:`tif_color.c`: Use double as the second argument of :c:func:`pow` function in :c:func:`TIFFCIELabToRGBInit`. As per bug :bugzilla-rs:`741` * :file:`tif_pixarlog.c`: Avoid warnings when converting float to integer as per bug :bugzilla-rs:`740` * :file:`tif_getimage.c`: Always fill the error message buffer in :c:func:`TIFFRGBAImageBegin` as per bug :bugzilla-rs:`739` * :file:`tif_jpeg.c`: Added ability to read/write the fax specific :c:macro:`TIFFTAG_FAXRECVPARAMS`, :c:macro:`TIFFTAG_FAXSUBADDRESS` and :c:macro:`TIFFTAG_FAXRECVTIME` tags as per bug :bugzilla-rs:`736` * :file:`tif_win32.c`: Fixed message formatting in functions :c:func:`Win32WarningHandler` and :c:func:`Win32ErrorHandler` as per bug :bugzilla-rs:`735` * :file:`tiffio.h`: Move the color conversion routines in the ``extern "C"`` section as per bug :bugzilla-rs:`727` * :file:`tiff.h`: Restore back the workaround for AIX Visual Age C compiler to avoid double definition of BSD types as per bug :bugzilla-rs:`39` * :file:`tif_getimage.c`: More fixes for multiple-alpha-channelled RGB-images as per bug :bugzilla-rs:`713` Tools changes ------------- * :file:`tiffcmp.c`: Added ability to compare the 32-bit integer and floating point data; complain on unsupported bit depths. * :file:`tiffcmp.c`: Use properly sized buffer in short arrays comparison as per bug :bugzilla-rs:`785` * :file:`fax2ps.c`: Replace insecure :c:func:`mktemp` function with the :c:func:`tmpfile` as per bug :bugzilla-rs:`786` * :file:`tiffgt.c`: Fix problem on big-endian CPUs so that images display more correctly. Images display brighter than they should on a Sun workstation. * :file:`tiff2ps.c`: Fixed problem with page sizes as per bug :bugzilla-rs:`742` * :file:`tiff2ps.c`: Interpret the "``-w``" and "``-h``" options independently. As per bug :bugzilla-rs:`689` * :file:`tiffdump.c`: Fixed problem when read broken TIFFs with the wrong tag counts (Dmitry V. Levin, Martin Pitt). * :file:`tiffset.c`: Convert character option to integer value as per bug :bugzilla-rs:`725`. Contributed software changes ---------------------------- * None. Changes in TIFF v3.7.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.3 (:tag:`Release-v3-7-3`) Previous Version :doc:`v3.7.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Replace runtime endianness check with the compile time one. * Added support for the new predictor type (floating point predictor), defined at the TIFF Technical Note 3. * Added Support for custom tags, passed by value. * Added support for all DNG tags. Software configuration changes ------------------------------ * Do not use empty ``-R`` option when linking with ``--enable-rpath``. * Added workaround for OpenBSD/MirOS soname problem as per bug :bugzilla-rs:`838` * Fixed parallel compilation of the libtiff and libtiffxx libraries as per bug :bugzilla-rs:`826` * :file:`configure.ac`, :file:`libtiff/Makefile.am`: Use libtool machinery to pass ``rpath`` option. * :file:`make.opt`: Build with Win32 CRT library by default. Library changes --------------- * :file:`tiffiop.h`, :file:`tif_open.c`: Added open option "``h``" to avoid reading the first IFD when needed. As per bug :bugzilla-rs:`875` * :file:`tiff.h`: Use correct :c:expr:`int` size on Sparc 64bit/Sun compiler platform. As per bug :bugzilla-rs:`855` * :file:`tif_dirinfo.c`: Added support for ``ClipPath``, ``XClipPathUnits`` and ``YClipPathUnits`` tags. * :file:`tif_dirinfo.c`, :file:`tif_dir.h`, :file:`tif_dir.c`, :file:`tif_print.c`: Make ``DocumentName``, ``Artist``, ``HostComputer``, ``ImageDescription``, ``Make``, ``Model``, ``Copyright``, ``DateTime``, ``PageName``, ``TextureFormat``, ``TextureWrapModes`` and ``TargetPrinter`` tags custom. * :file:`tif_jpeg.c`: Cleanup the codec state depending on :c:macro:`TIFF_CODERSETUP` flag (to fix memory leaks). * :file:`tif_dirwrite.c`: Use :c:member:`tdir_count` when calling :c:func:`TIFFCvtNativeToIEEEDouble` in the :c:func:`TIFFWriteDoubleArray` function as per bug :bugzilla-rs:`845` * :file:`tif_dirinfo.c`, :file:`tif_print.c`: :c:func:`TIFFFetchByteArray` returns :c:type:`uint16` array when fetching the ``BYTE`` and ``SBYTE`` fields, so we should consider result as pointer to :c:type:`uint16` array and not as array of :c:expr:`char`. As per bug :bugzilla-rs:`831` * :file:`tif_dir.c`: More efficient custom tags retrieval as per bug :bugzilla-rs:`830` * :file:`tif_win32.c`: Use ``FILE_SHARE_READ | FILE_SHARE_WRITE`` share mode in :c:func:`CreateFile` call as per bug :bugzilla-rs:`829` * :file:`tif_jpeg.c`: Substantial fix for :program:`addtiffo` problems with JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables in directory. * :file:`tif_dirread.c`: Changed the code that computes ``stripbytecount[0]`` if it appears bogus to ignore if ``stripoffset[0]`` is zero. This is a common case with GDAL indicating a "null" tile/strip. * :file:`tif_jpeg.c`: added ``LIB_JPEG_MK1`` support in :c:func:`JPEGDecodeRaw`. * :file:`tif_dirread.c`: Ensure that broken files with too many values in :c:func:`TIFFFetchPerSampleShorts`, :c:func:`TIFFFetchPerSampleLongs` and :c:func:`TIFFFetchPerSampleAnys` work ok instead of crashing. :bugzilla-rs:`843` * :file:`tif_predict.h`, :file:`tif_predict.c`: Added ability to decode and encode floating point predictor, as per TIFF Technical Note 3. See http://chriscox.org/TIFF_TN3_Draft2.pdf for details. * :file:`tiffio.h`, :file:`tiffiop.h`, :file:`tif_dir.c`, :file:`tif_read.c`, :file:`tif_swab.c`: Added :c:func:`_TIFFSwab24BitData` and :c:func:`TIFFSwabArrayOfLong` functions used to swap 24-bit floating point values. * :file:`tiff.h`: Added predictor constants. * :file:`tiffiop.h`, :file:`tif_dir.c`: Use :c:type:`uint32` type for appropriate values in :c:func:`_TIFFVSetField` function. Inspired by the bug :bugzilla-rs:`816` * :file:`tif_open.c`: Do not read header in case the output file should be truncated (Ron). * :file:`tif_dirinfo.c`, :file:`tif_config.h`.vc: Use :c:func:`lfind` instead of :c:func:`bsearch` in :c:func:`_TIFFFindFieldInfoByName` function (Ron). * :file:`tif_dir.c`, :file:`tif_print.c`: Properly handle all data types in custom tags. * :file:`dirinfo.c`: Added DNG tags. * :file:`tiff.h`: Added missed DNG tag (``LensInfo``); added DNG 1.1.0.0 tags. * :file:`tif_dir.c`, :file:`tif_print.c`: Added Support for custom tags, passed by value. * :file:`tiff.h`, :file:`tif_dirinfo.c`, :file:`tiffiop.h`: Added EXIF related tags. Tools changes ------------- * :file:`tiff2pdf.c`: Print two characters per loop in the :c:func:`t2p_write_pdf_trailer`. As per bug :bugzilla-rs:`594` * :file:`tiffgt.c`: Use MacOS X OpenGL framework when appropriate. As per bug :bugzilla-rs:`844` * :file:`ppm2tiff.c`: Fixed format string when read PPM file header with the :c:func:`fscanf` function. As per bug :bugzilla-rs:`861` * :file:`tiffsplit.c`: Check for ``JPEGTables`` tag presence before copying. * :file:`tiff2pdfr.c`: Calculate the tile width properly; added new option "``-b``" to use interpolation in output PDF files (Bruno Ledoux). * :file:`tiffdither.c`: Copy the `PhotometricInterpretation` tag from the input file. * :file:`tif2pdf.c`: Fixed problem with alpha channel handling as per bug :bugzilla-rs:`794`. Contributed software changes ---------------------------- * :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, :file:`addtiffo/tif_ovrcache.h`: Make overviews working for contiguous images. Changes in TIFF v3.7.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.7.4 (:tag:`Release-v3-7-4`) Previous Version :doc:`v3.7.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Fixed important bug in custom tags handling code. Software configuration changes ------------------------------ * Applied patch from Patrick Welche (all scripts moved in the :file:`config` and :file:`m4` directories). * :file:`SConstruct`, :file:`libtiff/SConstruct`: Added the first very preliminary support for SCons software building tool (``_). This is experimental infrastructure and it will exist along with the autotools stuff. * :file:`port/lfind.c`: Added :c:func:`lfind` replacement module. Library changes --------------- * :file:`tif_dir.c`: When prefreeing ``tv->value`` in :c:func:`TIFFSetFieldV` also set it to :c:macro:`NULL` to avoid double free when re-setting custom string fields as per: :bugzilla-rs:`922` * tif_dir.c: Fixed up support for swapping "double complex" values (128 bits as 2 64 bits doubles). GDAL gcore tests now pass on bigendian (macosx) system. * :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirinfo.c`: Do not upcast ``BYTE`` to ``SHORT`` in the :c:func:`TIFFFetchByteArray`. Remove :c:func:`TIFFFetchExtraSamples` function, use :c:func:`TIFFFetchNormalTag` instead as per bug :bugzilla-rs:`831` Remove :c:func:`TIFFFetchExtraSamples` function, use :c:func:`TIFFFetchNormalTag` instead. * :file:`tif_print.c`: Fixed printing of the ``BYTE`` and ``SBYTE`` arrays. * :file:`tif_write.c`: Do not check the ``PlanarConfiguration`` field in the :c:func:`TIFFWriteCheck` function in case of single band images (as per TIFF spec). * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_print.c`: Make ``FieldOfViewCotangent``, ``MatrixWorldToScreen``, ``MatrixWorldToCamera``, ``ImageFullWidth``, ``ImageFullLength`` and ``PrimaryChromaticities`` tags custom. Tools changes ------------- * :file:`tiffcp.c`: Fixed ``WhitePoint`` tag copying. Contributed software changes ---------------------------- * :file:`tiffdump.c`: Added support for :c:enumerator:`TIFF_IFD` datatype. * :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, :file:`addtiffo/tif_ovrcache.h`: Make overviews working for contiguous images. Changes in TIFF v3.8.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.8.0 (:tag:`Release-v3-8-0`) Previous Version :doc:`v3.7.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Read-only support for custom directories (e.g. EXIF directory). * Preliminary support for MS MDI format. Software configuration changes ------------------------------ * Make the default strip size configurable via the ``--with-default-strip-size`` and :c:macro:`STRIP_SIZE_DEFAULT` options. Library changes --------------- * :file:`tiffio.h`: Added :c:macro:`VC_EXTRALEAN` definition before including :file:`windows.h`, to reduce the compile time. * :file:`tif_jpeg.c`: Improve compilation under MinGW. * :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_dirwrite.c`, :file:`tif_print.c`, :file:`tif_getimage.c`: Make ``InkSet``, ``NumberOfInks``, ``DotRange`` and ``StoNits`` tags custom. * :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make ``WhitePoint`` tag custom. * :file:`tiffio.h`: fixed typo that potentially resulted in redefininition of :c:macro:`USE_WIN32_FILEIO` * :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make ``RichTIFFIPTC``, ``Photoshop`` and ``ICCProfile`` tags custom. * :file:`libtiff/*`, :file:`contrib/*`: Added 'dual-mode' error handling, enabling newer code to get context indicator in error handler and still remain compatible with older code: Done :c:func:`TIFFError` calls everywhere except in tools. * :file:`tiffinfo.c`: Print ``EXIF`` directory contents if exist. * :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, :file:`tif_dir.c`: Custom directory read-only support. * :file:`tif_aux.c`, :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, :file:`tif_dir.c`, :file:`tif_print.c`: Make ``YCbCrCoefficients`` and ``ReferenceBlackWhite`` tags custom. * :file:`tif_dirread.c`: One more workaround for broken ``StripByteCounts`` tag. Handle the case when ``StripByteCounts`` array filled with completely wrong values. * :file:`tif_dirinfo.c`: Release file descriptor in case of failure in the :c:func:`TIFFOpenW` function as per bug :bugzilla-rs:`1003` * :file:`tif_dirinfo.c`: Correctly use :c:func:`bsearch` and :c:func:`lfind` functions as per bug :bugzilla-rs:`1008` * :file:`tif_open.c`, :file:`tiff.h`, :file:`tiffdump.c`: Incorporate preliminary support for MS MDI format. :bugzilla-rs:`1002` * libtiff.def, :file:`tiffiop.h`, :file:`tiffio.h`: Made :c:func:`TIFFFreeDirectory` public. * :file:`/tif_dirinfo.c`: Make ``XResolution``, ``YResolution`` and ``ResolutionUnit`` tags modifiable during write process. As per bug :bugzilla-rs:`977` * :file:`if_dirread.c`: Don't try and split single strips into "0" strips in :c:func:`ChopUpSingleUncompressedStrip`. This happens in some degenerate cases (like 1×1 files with ``stripbytecounts==0`` (:file:`gtsmall.jp2` embed tiff) * :file:`tif_fax3.c`: changed '`at scanline ...`' style warning/errors with incorrect use of tif_row, to '`at line ... of strip/tile ...`' style. Tools changes ------------- * :file:`tiffcp.c`: Added many error reporting messages; fixed integer overflow as per bug :bugzilla-rs:`789` * :file:`tiffcp.c`: Return non-zero status when reading fails. * :file:`fax2tiff.c`: Properly calculate sizes of temporary arrays as per bug :bugzilla-rs:`943` * :file:`fax2tiff.c`: Added option `-r` to set RowsPerStrip parameter as per bug :bugzilla-rs:`944` * :file:`tiffdump.c`: Fixed :c:var:`typeshift` and :c:var:`typemask` arrays initialization problem as per bug :bugzilla-rs:`946` * :file:`bmp2tiff.c`: Fixed possible integer overflow error as per bug :bugzilla-rs:`965` * :file:`tiffsplit.c`: Copy fax related fields over split parts as per bug :bugzilla-rs:`983` * :file:`tiffdump.c`: Fixed crash when reading malformed tags. * :file:`tiff2pdf.c`: Added missed ``break`` statement as per bug :bugzilla-rs:`932` Contributed software changes ---------------------------- * :file:`contrib/addtiffo/*`: Major upgrade by Joris to support subsampled YCbCr images in jpeg compressed TIFF files. Changes in TIFF v3.8.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.8.1 (:tag:`Release-v3-8-1`) Previous Version :doc:`v3.8.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Bug-fix release. Software configuration changes ------------------------------ * libtool related stuff updated from the 2.1a branch. * Fix ``with_default_strip_size`` comparison as reported by Norihiko Murase. Library changes --------------- * :file:`tif_dirread.c`: Fixed error reporting in :c:func:`TIFFFetchAnyArray` function as per bug :bugzilla-rs:`1102` * :file:`tif_jpeg.c`, :file:`tif_pixarlog.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`: Properly restore ``setfield``/``getfield`` methods in cleanup functions. As per bug :bugzilla-rs:`1102` * :file:`tif_lzw.c`, :file:`tif_pixarlog.c`, :file:`tif_zip.c`: Use :c:func:`TIFFPredictorCleanup` in codec cleanup methods. As per bug :bugzilla-rs:`1102` * :file:`tif_predict.c`, :file:`tif_predict.h`: Added new function :c:func:`TIFFPredictorCleanup` to restore parent decode/encode/field methods. * :file:`tif_dirread.c`: Fixed integer overflow condition in :c:func:`TIFFFetchData` function. As per bug :bugzilla-rs:`1102` * :file:`tif_ojpeg.c`: Set the ``ReferenceBlackWhite`` with the :c:func:`TIFFSetField` method, not directly. As per bug :bugzilla-rs:`1043` * :file:`tif_write.c`: Small code rearrangement in :c:func:`TIFFWriteScanline` to avoid crash as per bug :bugzilla-rs:`1081` * :file:`tif_dirwrite.c`: Properly write ``TIFFTAG_DOTRANGE`` tag as per bug :bugzilla-rs:`1088` * :file:`tif_print.c`: Properly read :c:macro:`TIFFTAG_PAGENUMBER`, :c:macro:`TIFFTAG_HALFTONEHINTS`, :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` and :c:macro:`TIFFTAG_DOTRANGE` tags as per bug :bugzilla-rs:`1088` * :file:`tif_tile.c`: Fix error reporting in :c:func:`TIFFCheckTile` as per bug :bugzilla-rs:`1063` * :file:`tif_color.c`: Avoid overflow in case of wrong input as per bug :bugzilla-rs:`1065` * :file:`tif_dirinfo.c`: Use :c:enumerator:`TIFF_NOTYPE` instead of 0 when appropriate. As per bug :bugzilla-rs:`1033` * :file:`tif_aux.c`: Fixed type of temporary variable in :c:func:`_TIFFCheckMalloc` as per bug :bugzilla-rs:`103` * :file:`tif_aux.c`: Return static array when fetching default ``YCbCrCoefficients`` (another problem, reported a the :bugzilla-rs:`1029` entry). * :file:`tif_dir.c`: Special handling for ``PageNumber``, ``HalftoneHints``, ``YCbCrSubsampling`` and ``DotRange`` tags as per bugs :bugzilla-rs:`1029` :bugzilla-rs:`1034` * :file:`tif_dirread.c`: Use :c:func:`_TIFFGetExifFieldInfo` instead of :c:func:`_TIFFGetFieldInfo` in :c:func:`TIFFReadEXIFDirectory` call as per bug :bugzilla-rs:`1026` * :file:`tif_dirinfo.c`: Change definitions for :c:macro:`TIFFTAG_ICCPROFILE`, :c:macro:`TIFFTAG_PHOTOSHOP`, :c:macro:`TIFFTAG_RICHTIFFIPTC`, :c:macro:`TIFFTAG_XMLPACKET`: readcount should be :c:type:`uint32` value. Tools changes ------------- * :file:`ppm2tiff.c`: Added support for PBM files as per bug :bugzilla-rs:`1044` * :file:`tiff2pdf.c`: Functions :c:func:`t2p_sample_rgbaa_to_rgb` and :c:func:`t2p_sample_rgba_to_rgb` was used in place of each other, that was resulted in problems with RGBA images with associated alpha. As per bug :bugzilla-rs:`1097` * :file:`tiff2ps.c`: Properly scale all the pages when converting multipage TIFF with /width/height/center options set. As per bug :bugzilla-rs:`1080` * :file:`tiff2pdf.c`: Do not create output file until all option checks will be done. As per bug :bugzilla-rs:`1072` * :file:`bmp2tiff.c`: Added ability to create multipage TIFFs from the list of input files as per bug :bugzilla-rs:`1077` * :file:`tiffgt.c`: Avoid crashing in case of image unsupported by TIFFRGBAImage interface. * :file:`tiff2pdf.c`: Fixed support for non-YCbCr encoded JPEG compressed TIFF files, per submission from Dan Cobra. * :program:`bmp2tiff`, :program:`pal2rgb`, :program:`ppm2tiff`, :program:`ras2tiff`, :program:`raw2tiff`, :program:`sgi2tiff`, :program:`tiff2bw`, :program:`tiffcp`: Fixed jpeg option processing so ``-c jpeg:r:50`` works properly as per bug: :bugzilla-rs:`1025` Contributed software changes ---------------------------- None. Changes in TIFF v3.8.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.8.2 (:tag:`Release-v3-8-2`) Previous Version :doc:`v3.8.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Bug-fix release. Software configuration changes ------------------------------ * :file:`tools/Makefile.am`: Use runtime paths linker flags when rpath option enabled. * Makefiles improvements as per bug :bugzilla-rs:`1128` * Fixed win32 I/O functions usage as per bug :bugzilla-rs:`1127` Library changes --------------- * :file:`tif_strip.c`: Take subsampling in account when calculating :c:func:`TIFFScanlineSize`. * :file:`tif_jpeg.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`, :file:`tif_pixarlog.c`, :file:`tif_lzw.c`, :file:`tif_luv.c`: Use :c:func:`_TIFFSetDefaultCompressionState` in all codec cleanup methods. As per bug :bugzilla-rs:`1120` * :file:`tif_jpeg.c`: Do not cleanup codec state in :c:func:`TIFFInitJPEG`. As per bug :bugzilla-rs:`1119` * :file:`tif_dir.c`: Use :c:expr:`double` type instead of :c:type:`dblparam_t`. * :file:`tif_dirread.c`: Do not check the ``PlanarConfig`` tag presence in :c:func:`TIFFReadDirectory`, because it is always set at the start of function and we allow TIFFs without that tag set. Tools changes ------------- * :file:`tiffcp.c`: Do not set ``RowsPerStrip`` bigger than image length. * :file:`fax2tiff.c`: Fixed wrong :c:func:`TIFFerror` invocations as per bug :bugzilla-rs:`1125` * :file:`fax2ps.c`: Fixed reading the input stream from stdin as per bug :bugzilla-rs:`1124` * :file:`raw2tiff.c`: Do not set ``RowsPerStrip`` larger than ``ImageLength``. As per bug :bugzilla-rs:`1110` Contributed software changes ---------------------------- None. Changes in TIFF v3.9.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.0 (:tag:`Release-v3-9-0`) Previous Version :doc:`v3.9.0beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * All of the major changes since 3.8.0 were incorporated in the v3.9.0beta release. This is a stable release from a stable maintenance branch which incorporates many bug and security fixes needed by existing users of 3.X.X series libraries. Any future major changes will be in the 4.0.X series of releases. Software configuration changes ------------------------------ * Updated autotools: Autoconf 2.64, Automake 1.11, libtool 2.2.6. * Enabled support for Automake silent build rules (``--enable-silent-rules`` or ``make V=0``) * Enabled support for Automake colorized tests. * Added detection of a 64-bit integer type so that bundled utilities (like :program:`tiffcrop`) can use it when necessary. Note that this version of libtiff does not require a 64-bit integer type but libtiff 4.0 does. Library changes --------------- * :file:`libtiff/Makefile.am`, :file:`libtiff/Makefile.v`: Do not distribute :file:`tiffconf.h`, remove :file:`tif_config.h`/:file:`tiffconf.h` during cleaning. As per bug :bugzilla-rs:`1573` * :file:`tif_dirinfo.c`: :c:func:`_TIFFMergeFields()` now only merges in field definitions that are missing. Existing definitions are silently ignored. (:bugzilla-rs:`1585`) * :file:`tif_write.c`: Rip out the fancy logic in :c:func:`TIFFAppendToStrip` for establishing if an existing tile can be rewritten to the same location by comparing the current size to all the other blocks in the same directory. This is dangerous in many situations and can easily corrupt a file. (observed in esoteric GDAL situation that's hard to document). This change involves leaving the :c:expr:`stripbytecount[]` values unaltered till :c:func:`TIFFAppendToStrip`. Now we only write a block back to the same location it used to be at if the new data is the same size or smaller - otherwise we move it to the end of file. * :file:`tif_dirwrite.c`: Try to avoid writing out a full readbuffer of tile data when writing the directory just because we have :c:macro:`TIFF_BEENWRITING` at some point in the past. This was causing odd junk to be written out in a tile of data when a single tile had an interleaving of reading and writing with reading last. (highlighted by gdal :file:`autotest/gcore/tif_write.py` test 7.) * :file:`tif_predict.c`: use working buffer in :c:func:`PredictorEncodeTile` to avoid modifying callers buffer. :gdal-trac:`1965` * :file:`tif_predict.c`, :file:`tif_predict.h`, :file:`tif_lzw.c`, :file:`tif_zip.c`: Improvements so that predictor based encoding and decoding works in read-write update mode properly. :gdal-trac:`1948` * :file:`configure.com`, :file:`libtiff/tif_vms.c`: Better OpenVMS support. Patches from Alexey Chupahin. * :file:`tif_fax3.c`: fix leak of ``FAXCS`` state (per bug :bugzilla-rs:`1603`). * :file:`tif_fax3.c`: Make :c:func:`find0span` and :c:func:`find1span` non-inline to make MSVC 6.0 compiler happy. * :file:`tif_codec.c`: Avoid :c:macro:`NULL` pointer dereferencing for exotic compression codec codes. * :file:`tif_dirread.c`: zero ``tif->tif_dir`` after freeing the directory in :c:func:`TIFFReadCustomDirectory`. I don't exactly remember why this was important. * :file:`tif_dirwrite.c`: Fix potential memory leak writing large double tags. * :file:`tif_dirread.c`: Fix unchecked :c:func:`malloc` result. * :file:`libtiff/tif_lzw.c`: Properly zero out the codetable. As per bug :bugzilla:`1929` * :file:`libtiff/tif_lzw.c`: Properly zero out the string table. Fixes :cve:`2008-2327` security issue. * :file:`libtiff/tif_jbig.c`: Support the JBIG-KIT 2.0 (compatibility with the older versions retained). * :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: removed all use of ``UaToAa`` and ``Bitmap16to8`` arrays in :c:struct:`TIFFRGBAImage` structure to restore ABI compatibility. These were just an attempt to speed up processing with precalculated tables. :bugzilla:`1979` * :file:`libtiff/tif_codec.c`: Avoid printing ``c->name`` if it does not exist. * :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: More ABI corrections. Removed ``SubsamplingHor/Ver`` from :c:struct:`TIFFRGBAImage` structure. :bugzilla:`1980` * :file:`libtiff/tif_jpeg.c`: Avoid errors if the application writes a full strip for the last partial strip in a jpeg compressed file. :bugzilla:`1981` * :file:`libtiff/tiffio.h`: GCC will now validate format specifications for :c:func:`TIFFError`, :c:func:`TIFFErrorExt`, :c:func:`TIFFWarning`, and :c:func:`TIFFWarningExt` in order to reveal bugs. Cleaned up resulting warnings throughout for 32 bit build only. * :file:`libtiff/tiffiop.h`: Add private type declarations for :c:type:`int64`, and :c:type:`uint64` so that bundled utilities (like :program:`tiffcrop`) can use it when necessary. * :file:`libtiff/tif_predict.c`: Add support for 32bit integer horz. predictors. :bugzilla:`1911` * :file:`libtiff/tif_luv.c`: Fix handling of tiled logluv images. :bugzilla:`2005` * :file:`libtiff/tif_write.c`: do not override the planar configuration to be contig for one sample files if planar configuration is already set. :bugzilla:`2057` * :file:`libtiff/tif_lzw.c`: Fix buffer underflow bug. :bugzilla:`2065` * :file:`libtiff/tif_luv.c`: correct return codes from ``encoderow`` to be 1 on success instead of zero. :bugzilla:`2069` * :file:`libtiff/tif_print.c` (:c:func:`TIFFPrintDirectory`): Applied patch for "tag error may cause segfault in tif_print.c." :bugzilla:`1896` Tools changes ------------- * :file:`tools/tiff2pdf.c`: Fixed setting of alpha value per report on list. * :file:`tools/tiffsplit.c`: Get rid of unsafe :c:func:`strcpy`/:c:func:`strcat` calls when doing the filename/path construction. * :file:`tools/tiff2pdf.c`: More appropriate format string in :c:func:`t2p_write_pdf_string`; avoid signed/unsigned mismatch. * :file:`tools/tiffsplit.c`: Use dynamically allocated array instead of static when constructing output file names. * :file:`tools/tiffcrop.c`, :file:`man/tiffcrop.1`: Incorporated significant functionality update from Richard Nolde. * :file:`tools/tiff2ps.c`: Incorporated significant functionality update from Richard Nolde. In particular, support for rotating the image by 90, 180, 270, and 'auto' has been added. * :file:`tools/tiff2ps.c`: Remove spurious message printed to ``stderr``. * :file:`tools/tiffsplit.c`: fix ``sampleformat`` to be :c:type:`shortv` instead of :c:type:`longv`. * :file:`tools/rgb2ycbcr.c`, :file:`tools/tiff2rgba.c`: Applied patch for :cve:`2009-2347` libtiff: integer overflows in various inter-color space conversion tools. :bugzilla:`2079` Contributed software changes ---------------------------- * None Changes in TIFF v3.9.0beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.0beta (:tag:`Release-v3-9-0beta`) Previous Version :doc:`v3.8.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * New :program:`tiffcrop` utility contributed by Richard Nolde. :program:`tiffcrop` does the same as :program:`tiffcp`, but also can crop, extract, rotate and mirror images. * :file:`tif_jbig.c`: Added support for JBIG compression scheme (34661 code), contributed by Lee Howard. * Totally new implementation of OJPEG module from Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files should be supported now that was not supported previously. Software configuration changes ------------------------------ * :file:`tif_config.wince.h`, :file:`tiffconf.wince.h`, :file:`tif_wince.c`: WinCE-specific compatibility stuff from Mateusz Loskot. * Rename :file:`config.h.vc` and :file:`tif_config.h.vc` to :file:`config.vc.h` and :file:`tif_config.vc.h` for easier identification by folks using an IDE. * :file:`configure`, :file:`configure.ac`: OJPEG support enabled by default (i.e., when conformant JPEG support is enabled). * :file:`README.vms`, :file:`Makefile.am`, :file:`configure.com`, :file:`libtiff/Makefile.am`, :file:`libtiff/tif_config.h-vms`, :file:`libtiff/tif_stream.cxx`, :file:`libtiff/tif_vms.c`, :file:`libtiff/tiffconf.h-vms`: Added support for OpenVMS by Alexey Chupahin. * :file:`nmake.opt`: use ``/EHsc`` for VS2005 compatibility. Also define :c:macro:`_CRT_SECURE_NO_DEPRECATE` to avoid noise on VS2005. Library changes --------------- * :file:`tif_dirinfo.c` (:c:func:`_TIFFFindFieldInfo`): Don't attempt to :c:func:`bsearch` on a :c:macro:`NULL` fieldinfo list. (:c:func:`_TIFFFindFieldInfoByName`): Don't attempt to :c:func:`lfind` on a :c:macro:`NULL` fieldinfo list. * :file:`tif_jpeg.c`: Changed :c:func:`JPEGInitializeLibJPEG` so that it will convert from decompressor to compressor or compress to decompress if required by the force arguments. This works around a problem in where the :c:func:`JPEGFixupTestSubsampling` may cause a decompressor to be setup on a directory when later a compressor is required with the force flag set. Occurs with the :program:`addtiffo` program for instance. * :file:`tif_dirwrite.c`: Fixed swapping of byte arrays stored in-place in tag offsets as per bug :bugzilla-rs:`1363` * :file:`tif_getimage.c`: workaround for "Fractional scanline" error reading OJPEG images with rowsperstrip that is not a multiple of vertical subsampling factor. This bug is mentioned in :bugzilla-rs:`1390` and ``_ * :file:`tif_dirread.c`: Added special function to handle ``SubjectDistance`` EXIF tag as per bug :bugzilla-rs:`1362` * :file:`tif_dirread.c`, :file:`tif_read.c`: Type of the byte counters changed from :c:type:`tsize_t` to :c:type:`uint32` to be able to work with data arrays larger than 2GB. Fixes bug :bugzilla-rs:`890`. Idea submitted by Matt Hancher. * :file:`tif_dir.c`: Workaround for incorrect TIFFs with ``ExtraSamples == 999`` produced by Corel Draw. As per bug :bugzilla-rs:`1490` * :file:`tif_write.c`: :c:func:`TIFFAppendToStrip` - clear sorted flag if we move a strip. :bugzilla-rs:`1359` * :file:`tif_fax3.c`: Save the state of printdir codec dependent method. * :file:`tif_jpeg.c`: Save the state of printdir codec dependent method as per bug :bugzilla-rs:`1273` * :file:`tif_win32.c`: Fixed problem with offset value manipulation as per bug :bugzilla-rs:`1322` * :file:`tif_fax3.c`, :file:`tif_next.c`, :file:`tif_pixarlog.c`: Fixed multiple vulnerabilities, as per Gentoo bug (): ``_ * :file:`tif_lzw.c`, :file:`tif_zip.c`: Fixed problems with mixing encoding and decoding on the same read-write TIFF handle. The LZW code can now maintain encode and decode state at the same time. The ZIP code will switch back and forth as needed. :bugzilla-rs:`757` * :file:`tif_msdos.c`: Avoid handle leak for failed opens. c/o Thierry Pierron * :file:`tif_dirwrite.c`: take care not to flush out buffer of strip/tile data in :c:func:`_TIFFWriteDirectory` if :c:macro:`TIFF_BEENWRITING` not set. Relates to bug report by Peng Gao with black strip at bottom of images. * :file:`tif_dirwrite.c`: make sure to use :c:type:`uint32` for wordcount in :c:func:`TIFFWriteNormalTag` if ``writecount`` is :c:macro:`VARIABLE2` for ASCII fields. It already seems to have been done for other field types. Needed for :program:`tiffset` on files with geotiff ascii text. * :file:`tif_dirinfo.c`: Added missed EXIF tag ``ColorSpace`` (40961). * :file:`tif_dirread.c`: Move IFD fetching code in the separate function :c:func:`TIFFFetchDirectory` avoiding code duplication in :c:func:`TIFFReadDirectory` and :c:func:`TIFFReadCustomDirectory`. * :file:`tif_readdir.c`: Added case in :c:func:`EstimateStripByteCounts` for tiled files. Modified :c:func:`TIFFReadDirectory` to not invoke :c:func:`EstimateStripByteCounts` for case where entry 0 and 1 are unequal but one of them is zero. :bugzilla-rs:`1204` * :file:`tif_open.c`, :file:`tif_dirread.c`, :file:`tiffiop.h`: Move IFD looping checking code in the separate function :c:func:`TIFFCheckDirOffset`. * :file:`tif_aux.c`: Added :c:func:`_TIFFCheckRealloc` function. * :file:`tif_fax3.c`: Fixed problems in fax decoder as per bug :bugzilla-rs:`1194` * :file:`tif_jbig.c`: Added support for JBIG compression scheme (34661 code) contributed by Lee Howard. As per bug :bugzilla-rs:`896`. * :file:`tif_getimage.c`: Added support for planarconfig separate non-subsampled YCbCr (i.e. separate YCbCr with subsampling ``[1,1]``). * :file:`tif_getimage.c`: Revision of all RGB(A) put routines: * Conversion of unassociated alpha to associated alpha now done with more performant LUT, and calculation more correct. * Conversion of 16bit data to 8bit data now done with more performant LUT, and calculation more correct * Bugfix of handling of 16bit RGB with unassociated alpha * :file:`tif_ojpeg.c`: totally new implementation * :file:`tif_getimage.c`: removed :c:macro:`TIFFTAG_JPEGCOLORMODE` handling of OJPEG images in favor of tif_getimage.c native handling of YCbCr and desubsampling. * :file:`tif_jpeg.c`: :c:func:`JPEGVSetField` so that altering the photometric interpretation causes the "upsampled" flag to be recomputed. Fixes peculiar bug where photometric flag had to be set before jpegcolormode flag. Tools changes ------------- * :file:`tiff2ps.c`: Added support 16-bit images as per bug :bugzilla-rs:`1566`. Patch from William Bader. * :file:`tiff2pdf.c`: Fix for :c:macro:`TIFFTAG_JPEGTABLES` tag fetching and significant upgrade of the whole utility as per bug :bugzilla-rs:`1560`. Now we don't need :file:`tiffiop.h` in :program:`tiff2pdf` anymore and will open output PDF file using :c:func:`TIFFClientOpen` machinery as it is implemented by Leon Bottou. * :file:`tiffcrop.c`: New tiffcrop utility contributed by Richard Nolde. As per bug :bugzilla-rs:`1383` * :file:`tiff2pdf.c`: Do not assume inches when the resolution units do not specified. As per bug :bugzilla-rs:`1366` * :file:`tiffset.c`: Properly handle tags with :c:macro:`TIFF_VARIABLE` writecount. As per bug :bugzilla-rs:`1350` * :file:`tif2rgba.c`: This utility does not work properly on big-endian architectures. It was fixed including the bug :bugzilla-rs:`1149` * :file:`tiff2pdf.c`: Fix handling of ``-q`` values. :bugzilla-rs:`587` * :file:`tiffcmp.c`: Fixed floating point comparison logic as per bug :bugzilla-rs:`1191` * :file:`tiff2pdf.c`: Fixed buffer overflow condition in :c:func:`t2p_write_pdf_string` as per bug :bugzilla-rs:`1196` Contributed software changes ---------------------------- * :file:`contrib/addtiffo/tif_overview.c`: Fix problems with odd sized output blocks in :c:func:`TIFF_DownSample_Subsampled` (:bugzilla-rs:`1542`). * :file:`contrib/dbs/xtiff/xtiff.c`: Make xtiff utility compilable. Though it is still far from the state of being working and useful. Changes in TIFF v3.9.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.1 (:tag:`Release-v3-9-1`) Previous Version :doc:`v3.9.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * This is a bug-fix release for several bugs (two of which are dire) which were discovered in the 3.9.0 release. Software configuration changes ------------------------------ * Several defines were missing from :file:`tif_config.vc.h` which are necessary to compile the library using MSVC. * Colorized tests were actually not enabled as expected. Parallel tests mode is now also enabled so that tests can be run in parallel, and test output is sent to :file:`.log` files. Library changes --------------- * :file:`libtiff/tif_write.c` (:c:func:`TIFFAppendToStrip`): Remove cast which caused libtiff to output a wrong last strip with byte-count and strip-offset of zero. This cast was added on the day of the 3.9.0 release. * :file:`libtiff/tif_dirwrite.c`: Back out changes from 2007-11-22 that resulted in the final strip not being written in some circumstances. :bugzilla:`2088` Tools changes ------------- None Contributed software changes ---------------------------- * None Changes in TIFF v3.9.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.2 (:tag:`Release-v3-9-2`) Previous Version :doc:`v3.9.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Fixes a number of bugs present in the 3.9.1 release. * OJPEG support updated to work with IJG JPEG 7 release. * :program:`tiffcrop` validated for most TIFF storage subformats and sample depths. Software configuration changes ------------------------------ * x86_64 now uses the same default fill order as i386. Library changes --------------- * Writing tags with an array value of type :c:enumerator:`TIFF_DOUBLE` now returns correct error status. The :c:macro:`TIFFTAG_SMINSAMPLEVALUE` and :c:macro:`TIFFTAG_SMAXSAMPLEVALUE` tags failed to write without this fix. * OJPEG decoder now works with IJG JPEG 7. Resolves "Bug 2090 - OJPEG crash with libjpeg v7". :bugzilla:`2090` * Eliminate most GCC "dereferencing type-punned pointer" warnings. Tools changes ------------- * New :program:`tiffcrop` from Richard Nolde. Major updates to add significant functionality for reading and writing tile based images with bit depths not a multiple of 8 which cannot be handled by :program:`tiffcp`. * Allow building tools with GCC using the ``-Wformat -Werror=format-security`` flags. Contributed software changes ---------------------------- * None Changes in TIFF v3.9.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.3 (:tag:`Release-v3-9-3`) Previous Version :doc:`v3.9.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Fixes for :cve:`2010-1411`. * Various reported bug fixes. Software configuration changes ------------------------------ * libtool is updated to version 2.2.10. Library changes --------------- * Fix a couple of issues that trigger failures in some cases when using :c:func:`TIFFReadScanline` with JPEG compressed subsampled ycbcr images. :bugzilla:`1936` * Ensure tile and scanline sizes are reset when moving to new directories. :bugzilla:`1936` * Do not generate a ``JPEGTables`` tag when creating the JPEG TIFF as is is not required in order to prevent it from being unused and filled with invalid data. (Leave it to be generated by later activity.) :bugzilla:`2135` * Don't return error on badly-terminated MMR strips. :bugzilla:`2029` * Have :c:macro:`TIFFTAG_REFERENCEBLACKWHITE` always print 6 floats instead of ``2*SamplesPerPixel``. :bugzilla:`2186` * Ensure that JPEG quality is always set in :c:func:`JPEGPreEncode`, not just when we want to output local tables. Otherwise the quality used during compression may not be right and might not match the tables in the tables tag. This bug only occurs when seeking between directories in the midst of writing blocks. :gdal-trac:`3539` * OJPEG: Report an error and avoid a crash if the input file is so broken that the strip offsets are not defined. * Eliminate FAX3 decoder buffer overrun possibility (:cve:`2010-1411`). * Restore ``ReferenceBlackWhite`` as a non-custom field. This avoids a multi-thread reentrancy problem as well as fixing output of wrong tag value due to redundant definitions for the same tag in the :c:expr:`tiffFieldInfo[]` array. Resolves :bugzilla:`2185` Tools changes ------------- * :program:`tiff2pdf`: Write the JPEG SOI headers into the TIFF strip data rather than skipping them. This fixes the ability to view in Acrobat Reader, Evince, and Ghostscript. :bugzilla:`2135` * :program:`ppm2tiff`: While case for parsing comment line requires extra parenthesis to work as expected. Reported by Thomas Sinclair. * :program:`tiffcp`: add a new option ``-x`` to force merged tiff file ``PAGENUMBER`` value in sequence for users who care the page sequence, this will also prevent :program:`tiff2pdf` from creating pdf file from the merged tiff file with wrong page sequence. * :program:`tiffcp`: Applied Tom Lane's patch to reject YCbCr subsampled data since :program:`tiffcp` currently doesn't support it. :bugzilla:`2097` Contributed software changes ---------------------------- * None Changes in TIFF v3.9.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.4 (:tag:`Release-v3-9-4`) Previous Version :doc:`v3.9.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Complete the fixes for :cve:`2009-2347`. * :program:`tiffcrop` now supports custom page sizes. Software configuration changes ------------------------------ * None. Library changes --------------- * Fixed inadequate validation of the ``SubjectDistance`` field. * Fixed bad handling of out of order tags definated late by a codec. * Avoid re-preparing jpeg tables unnecessarily. Tools changes ------------- * :program:`tiffcrop`: Added an option to allow the user to specify a custom page size on the command line. Fix the case where a page size specified with a fractional part was being coerced to an integer by retyping the variables that define the paper size. Corrected European page size dimensions. * :program:`tiff2rgba`: Completed fixes for ":cve:`2009-2347` libtiff: integer overflows in various inter-color space conversion tools". :bugzilla:`2079` * :program:`tiff2pdf`: Fix assorted bugs in :program:`tiff2pdf`: missing ``return`` in :c:func:`t2p_read_tiff_size` causes ``t2p->tiff_datasize`` to be set entirely wrong for :c:macro:`COMPRESSION_JPEG` case, resulting in memory stomp if actual size is larger. Also, there are a bunch of places that try to :c:func:`memset` a malloc'd buffer before checking for malloc failure, which would result in core dump if there actually were a failure. Contributed software changes ---------------------------- * None Changes in TIFF v3.9.5 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v3.9.5 (:tag:`Release-v3-9-5`) Previous Version :doc:`v3.9.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * :file:`configure.ac`: Should use ``AC_CANONICAL_HOST`` since host specifies the run-time target whereas target is used to specify the final output target if the package is a build tool (like a compiler), which libtiff is not. Resolves :bugzilla:`2307` "Use AC_CANONICAL_HOST macro". Library changes --------------- * :file:`libtiff/tif_getimage.c`: Check the number of samples per pixel when working with YCbCr image in :c:func:`PickContigCase`. As per bug :bugzilla:`2216` * :file:`libtiff/tif_dir.c`: Set the bogus post-decoding hook when processing :c:macro:`TIFFTAG_BITSPERSAMPLE` in :c:func:`_TIFFVSetField` for the case of 8 bit when we don't need any post-processing. That helps to reset the hook if we previously set this field to some other value and the hook was initialized accordingly. As per bug :bugzilla:`2035` * :file:`libtiff/tif_getimage.c`: Avoid wrong math du to the signed/unsigned integer type conversions. As per bug :bugzilla:`2207` * :file:`libtiff/tif_dirinfo.c`: Don't use assertions in :c:func:`_TIFFFieldWithTag` and :c:func:`_TIFFFieldWithName` if the tag is not found in the tag table. This should be normal situation and returned :c:macro:`NULL` value should be properly handled by the caller. * :file:`libtiff/{tif_dirwrite.c, tif_print.c}`: Properly handle ``DotRange`` tag as it can be either byte or short size and should be set and read by value, not as an array. As per bug :bugzilla:`2116` * :file:`libtiff/tif_dirread.c`: Really reset the tag count in :c:func:`CheckDirCount` to expected value as the warning message suggests. As per bug :bugzilla:`1963` * :file:`libtiff/tif_open.c`: Fix mode check before opening a file. :bugzilla:`1906` * :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`: apply patch for :cve:`2010-3087` per bug :bugzilla:`2140` * :file:`libtiff/tif_dirread.c`: fix crash when reading a badly-constructed TIFF per :bugzilla:`1994` * :file:`libtiff/tif_ojpeg.c`: fix buffer overflow on problem data :bugzilla:`1999` * :file:`libtiff/tif_dirread.c`: modify warnings :bugzilla:`2016` * :file:`libtiff/tif_jpeg.c`: fix use of clumplines calculation :bugzilla:`2149` * :file:`libtiff/tif_color.c`: prevent crash in handling bad TIFFs resolves :cve:`2010-2595`, :bugzilla:`2208` * :file:`libtiff/tif_dirread.c`: fix needless tag ordering warning :bugzilla:`2210` * :file:`libtiff/tif_jpeg.c`: reduce usage of ``JCS_UNKNOWN`` in order to improve compatibility with various viewers submitted by e-mail from `Dwight Kelly `_ * :file:`libtiff/tif_strip.c`: use :c:func:`TIFFGetFieldDefaulted` instead of :c:func:`TIFFGetField` when we assume that it will succeed :bugzilla:`2215` * :file:`libtiff/tif_dirread.c`: tolerate some cases where ``FIELD_COLORMAP`` is missing :bugzilla:`2189` * :file:`libtiff/tif_jpeg.c`: Fix regressions with 2 and 3 band images caused by commit on 2010-12-14. Submitted by e-mail from `Even Rouault `_ * :file:`libtiff/tif_dirwrite.c`: Avoid undefined behaviour when casting from :c:expr:`float` to :c:expr:`unsigned int` in :c:func:`TIFFWriteRationalArray` as reported by Kareem Shehata. * :file:`libtiff/tif_fax3.h`: Protect against a fax ``VL(n)`` codeword commanding a move left. Without this, a malicious input file can generate an indefinitely large series of runs without ``a0`` ever reaching the right margin, thus overrunning our buffer of run lengths. Per :cve:`2011-0192`. This is a modified version of a patch proposed by Drew Yao of Apple Product Security. It adds an :c:func:`unexpected` report, and disallows the equality case, since emitting a run without increasing ``a0`` still allows buffer overrun. * :file:`libtiff/tif_fax3.h`: Fix to last change allowing zero length runs at the start of a scanline---needed for legal cases. * :file:`libtiff/tif_thunder.c`: Correct potential buffer overflow with thunder encoded files with wrong bitspersample set. The libtiff development team would like to thank Marin Barbella and TippingPoint's Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, :cve:`2011-1167`). :bugzilla:`2300` * :file:`libtiff/tiffiop.h`: avoid declaring :c:type:`int64`/:c:type:`uint64` on AIX with XLC where they are already available. (:bugzilla:`2301`) Tools changes ------------- * :file:`tools/tiffcrop.c`: Patch from Richard Nolde. Reject YCbCr subsampled data since tiffcrop currently doesn't support it. Fix JPEG support. * :file:`tools/tiffcp.c`: Initialize buffer arrays with zero to avoid referencing to uninitialized memory in some cases (e.g. when tile size set bigger than the image size). * :file:`tools/tiff2pdf.c`: Better generation of ID field in :c:func:`t2p_write_pdf_trailer`. Get rid of GCC aliasing warnings. * :file:`tools/tiff2pdf.c`: Fixed computation of the tile buffer size when converting JPEG encoded tiles. * :file:`tools/tiff2pdf.c`: Better handling of string fields, use static string buffers instead of dynamically allocated, use :c:func:`strncpy` instead of :c:func:`strcpy`, control the string lengths. * :file:`tools/tiff2bw.c`, :file:`tools/thumbnail.c`, :file:`tools/pal2rgb.c`: Fix the count for ``WhitePoint`` tag as per bug :bugzilla:`2042` * :file:`tools/tiffdump.c`: Use :c:func:`PrintData` function instead of :c:func:`PrintByte`/:c:func:`PrintShort`/:c:func:`PrintLong`. Should fix an issue reported at :bugzilla:`2116` * :file:`tools/tiffset.c`: Properly handle ``TIFFTAG_PAGENUMBER``, ``TIFFTAG_HALFTONEHINTS``, ``TIFFTAG_YCBCRSUBSAMPLING``, ``TIFFTAG_DOTRANGE`` which should be set by value. * :file:`tools/tiffdump.c`: Avoid integer overflows computing the buffer size for large directories. As per bug :bugzilla:`2218` * :file:`tools/tiff2pdf.c`: Fixed ID buffer filling in :c:func:`t2p_write_pdf_trailer`, thanks to Dmitry V. Levin. * :file:`tools/tiffcrop.c`: Patch from Richard Nolde to avoid a potentially unterminated buffer due to using an exceptionally long file name. * :file:`tools/tiff2ps.c`: improvements and enhancements from Richard Nolde with additional command line options for Document Title, Document Creator, and Page Orientation * :file:`tools/tiffsplit.c`: abort when reading a TIFF without a byte-count per :bugzilla:`1996` * :file:`tools/tiff2pdf.c`: add fill-page option :bugzilla:`2051` * :file:`tools/fax2ps.c`: replace unsafe :c:func:`tmpfile` with :c:func:`mkstemp` :bugzilla:`2118` * :file:`tools/tiff2pdf.c`: fix colors for images with RGBA interleaved data :bugzilla:`2250` * :file:`tools/tiffcrop.c`: new release by Richard Nolde :bugzilla:`2004` * :file:`tools/fax2ps.c`: be consistent with page-numbering :bugzilla:`2225` * :file:`tools/gif2tiff.c`: fix buffer overrun :bugzilla:`2270` * :file:`tools/fax2ps.c` (:c:func:`main`): Use :c:func:`tmpfile` rather than :c:func:`mkstemp` since it is much more portable. Tmpfile is included in ISO/IEC 9899:1990 and the WIN32 CRT. Contributed software changes ---------------------------- * None Changes in TIFF v4.0.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.0 (:tag:`Release-v4-0-0`) Previous Version :doc:`v3.9.5 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. Please consult the ChangeLog file in the source package for full change details. The following information is located here: Major changes ------------- BigTIFF support changes: * The ``options`` parameter in the :c:func:`TIFFOpen` and :c:func:`TIFFClientOpen` funcs has been extended. When creating new files, you can add option ``4`` to specify you want to create a ClassicTIFF file, though that is the default and the option is not strictly necessary. (As such, old calling code will continue to function and create ClassicTIFF files.) Or you can add option ``8`` to specify you want to create a BigTIFF file instead. This new option is also reflected in some of the tools we already upgraded. For instance, you can use the ``-8`` option on :program:`tiffcp` to have :program:`tiffcp` produce BigTIFF files instead of the default ClassicTIFF. (Whilst an additional option is provided for version selection when creating new files, no such option is necessary when reading TIFF files. LibTiff reads ClassicTIFF and BigTIFF both, and the application does not need to be aware which TIFF version an opened file is.) * Although the tag count in BigTIFF is 64bit, we restricted the count in the implementation to a much more reasonable size. This is necessary in current implementation, because all tag data gets read automatically in the IFD reading stage, so if there's half a dozen private tags with multiple gigabytes of data that causes considerable overhead even if the application level is never interested in these tags. Our choice to ignore tags with data longer then a certain sanity value is much needed as things stand. We also recommend to step away from writing tiles that are 8 kilobyte in their uncompressed form, or writing single-line strips, in really big files, resulting in mega's of tiles or strips. It's much more efficient to choose bigger tile or strip sizes, up to several megabyte if needed, and have a few kilo of tiles or strips instead. * Although it's rare, some application code does directly access file offsets. Some of these are automatically upgraded because they used the :c:type:`toff_t` type, others need to be aware that the datatype changed and need to start using :c:type:`toff_t` or :c:type:`uint64`. This impacts access to tags like the ``EXIF`` IFD tag, for example, or the ``SubIfds`` tag, or to ``StripOffsets`` or ``TileOffsets``, the return type of functions like :c:func:`TIFFCurrentDirOffset`, and a parameter type to functions like :c:func:`TIFFSetSubDirectory`. * Although it's rare, some application code does use structures like :c:struct:`TIFFHeader` or :c:struct:`TIFFDirEntry` that used to be an exact binary representation of TIFF structures. These need to change. The old TIFFHeader structure is replaced by the new TIFFHeaderClassic, TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact binary representation of the ClassicTIFF and BigTIFF header, and of the part that is common to both. There is no new equivalent for the old :c:struct:`TIFFDirEntry` structure (or more precisely, there is still a :c:struct:`TIFFDirEntry` structure, but it is changed, moved to library-private definition, and no longer an exact binary representation of the tag structure of either TIFF version). * Sizer functions, like :c:func:`TIFFTileSize` or :c:func:`TIFFScanlineSize` and the like, return a :c:func:`tmsize_t` value (:c:func:`tmsize_t` is defined as :c:type:`int32` on 32bit machines, and :c:type:`int64` on 64bit machines, and as such it is meant to represent signed memory sizes). This is because we figure 98% of the calling code uses the return value as sizes in allocations and the like. So, any overflow that is theoretically possible with BigTIFF when LibTiff is running on a 32bit system, is best detected inside the sizer functions and it is best to return a type that makes sense as a memory size. If your calling code is the exception and is interested in actual file size, you best use the newer :c:func:`TIFFTileSize64` or :c:func:`TIFFScanlineSize64` function that returns an :c:type:`uint64` type. * These TIFF tags require a 64-bit type as an argument in libtiff 4.0.0: * :c:macro:`TIFFTAG_FREEBYTECOUNTS` * :c:macro:`TIFFTAG_FREEOFFSETS` * :c:macro:`TIFFTAG_STRIPBYTECOUNTS` * :c:macro:`TIFFTAG_STRIPOFFSETS` * :c:macro:`TIFFTAG_TILEBYTECOUNTS` * :c:macro:`TIFFTAG_TILEOFFSETS` Other important backward incompatible changes in the public API: * :c:func:`TIFFRewriteField` renamed into :c:func:`_TIFFRewriteField` and moved out from the public interface (from :file:`tiffio.h` to :file:`tiffiop.h`). Type of its ``count`` parameter changed from :c:type:`uint32` to :c:type:`tmsize_t`. * :c:func:`TIFFMergeFieldInfo` returns non-void result now. It returns 0 if successful and -1 if failed. Though this is now obsoleted function and should not be used in new programs. Use the new tag extension scheme instead. * :c:func:`TIFFFieldWithTag` and :c:func:`TIFFFieldWithName` functions now return pointer to :c:struct:`TIFFField` constant object instead of :c:struct:`TIFFFieldInfo`. * :c:func:`TIFFReassignTagToIgnore` function and :c:enum:`TIFFIgnoreSense` enumeration have been removed. They was unused and never been used properly. Should be unneeded for high-level applications. * :c:struct:`TIFFTagValue` structure removed from the public :file:`tiffio.h` to private :file:`tif_dir.h` and not accessible anymore. It should be unneeded for high-level applications. Software configuration changes ------------------------------ Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool 2.4. * Enabled support for Automake silent build rules (``--enable-silent-rules`` or ``make V=0``) * Enabled support for Automake colorized and parallel tests. * Added detection of 64-bit integer types since libtiff 4.0 requires use of 64-bit signed and unsigned integer types. * Libtiff now provides a more comprehensive test suite with over 72 tests, which may be executed on Unix-like systems, or under Microsoft Windows using MinGW/MSYS or Cygwin. * ``--disable-lzma`` configure option to disable use of liblzma. * ``--enable-defer-strile-load`` configure option to enable experimental deferred strip/tile offset/size loading. May cause some extremely sophisticated uses of libtiff to fail. * ``--enable-chunky-strip-read`` configure option to enable experimental enable reading large strips in chunks in :c:func:`TIFFReadScanline`. * Now always uses WIN32 native I/O functions for Microsoft Windows except for under Cygwin. * Now provides a pkg-config support file (libtiff-4.pc). Library changes --------------- * Patches/fixes made to stable libtiff (v3.9.X) are also applied to 4.0.0. There are too many to list here. See the distribution :file:`ChangeLog` for a detailed change list. * There is considerable change in some files like :c:func:`tif_dirread` and :c:func:`tif_dirwrite`. These changes don't impact backwards compatibility, they are mostly a clean rewrite that does allow BigTIFF support as well as somewhat more robust reading of the unexpected already and will also serve future API extension but does not impact current API or functionality in a negative way that you need to know about. * Although there is still a functional definition for types like :c:type:`toff_t` (file offset), :c:type:`tstrip_t` (strip index number), etc, we recommend against using these in newer code. We have learned that it is next to impossible to use these consistently and make real abstraction of the binary format of these types. Instead, at a certain level we always end up doing casts anyway, and taking the exact binary format into account, so these types are nothing but dangerously misleading and obfuscating. You do not need to update calling code that uses them, as 99.9% of such code will continue to work. But we recommend against using them in newer calling code, and we started replacing them with binary clear types like :c:type:`uint16`, :c:type:`uint32` and such in the library. * We do use and will continue to use one functional type that is an exception to the above rule, being :c:type:`tmsize_t`. This is a signed memory size type, i.e. it is :c:type:`int32` on 32bit machines, or :c:type:`int64` on 64bit machines. * Optionally support LZMA compression via TIFF tag 34925. :program:`tiffcp` supports compression levels similar to ``-c lzma:p1`` or ``-c zip:p9`` for setting the LZMA compression parameters. * Optionally defer the load of strip/tile offset and size tags for optimized scanning of directories. Enabled with the ``--enable-defer-strile-load`` configure option (:c:macro:`DEFER_STRILE_LOAD` ``#define`` in :file:`tif_config.h`). * Optionally enable experimental support for reading big strips in chunks. Enabled with the ``--enable-chunky-strip-read`` configure option. Tools changes ------------- * :program:`tiffset`: add ``-d`` and ``-sd`` switches to allow operation on a particular directory, not just the first. Contributed software changes ---------------------------- * None Changes in TIFF v4.0.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.1 (:tag:`Release-v4-0-1`) Previous Version :doc:`v4.0.0 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * ``--enable-ld-version-script``: New :program:`configure` option to enable shared library symbol versioning on ELF-based systems (e.g. Linux and FreeBSD) which use the GNU linker. This allows multiple major versions of libtiff to be loaded simultaneously into the same application or library without conflict, as long as all libtiffs involved are built with versioned symbols. This option is not enabled by default. * Added libtiff private dependency on ``-llzma`` for pkg-config. Library changes --------------- * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`: Extra caution around assumption tag fetching is always successful. * :file:`libtiff/tif_jpeg.c`: Extra caution for case where :c:var:`sp` is :c:macro:`NULL`. Tools changes ------------- * None Contributed software changes ---------------------------- * None Changes in TIFF v4.0.10 ======================= .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.10 (:tag:`v4.0.10`) Previous Version :doc:`v4.0.9 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at `Gitlab `_. This is the first release to be made from the new Git repository. Software configuration changes ------------------------------ * Minimum CMake version is now v2.8.11 for the CMake-based build. * Libwebp will be automatically detected and used by configure/cmake if present. * Libzstd will be automatically detected and used by configure/cmake if present. Library changes --------------- * Added ZSTD compression codec. `Zstandard `_ or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios. It's backed by a very fast entropy stage, provided by Huff0 and FSE library. We require libzstd >= 1.0.0 so as to be able to use streaming compression and decompression methods. The default compression level we have selected is 9 (range goes from 1 to 22), which experimentally offers equivalent or better compression ratio than the default deflate/ZIP level of 6, and much faster compression. For example on a 6600×4400 16bit image, ``tiffcp -c zip`` runs in 10.7 seconds, while ``tiffcp -c zstd`` runs in 5.3 seconds. Decompression time for zip is 840 ms, and for zstd 650 ms. File size is 42735936 for zip, and 42586822 for zstd. Similar findings on other images. On a 25894×16701 16bit image: .. table:: Compressor Relative Performance :widths: auto =========== ================ ================== =========== Compressor Compression time Decompression time File size =========== ================ ================== =========== ZSTD 35 s 3.2 s 399,700,498 ZIP/Deflate 1m 20 s 4.9 s 419,622,336 =========== ================ ================== =========== Please note that ``COMPRESSION_ZSTD`` is self-assigned the id 50000 by the libtiff project and is not officially registered with Adobe since Adobe's registration function is defunct. * Added WebP compression codec. `WebP `_ is a high performance compressor intended for photos as commonly used on the Web. The WebP encoder is not designed for huge images, but serves very well for compressing strips and tiles in TIFF as long as the strips or tiles do not exceed the capability of the encoder. As a test of compression performance metrics, GraphicsMagick was used on an extremely high quality 8-bit TIFF image from a Hasselblad H4D-200MS camera with pixel dimensions of 16352×12264. The image was re-encoded with 1024×1024 tiles and various compression algorithms, using default settings for each algorithm. Based on this test, the compression and decompression performance (in iterations per second), the resulting file size, and the calculated total PSNR are provided here. It can be seen that WebP provided excellent encode and decode performance, and the compressed file size was very small: .. table:: Compressor Relative Performance :widths: auto ========== ============ ============= ========= ===== Compressor Compression Decompression File size PSNR ========== ============ ============= ========= ===== None 0.536 iter/s 1.506 iter/s 576.03MiB ∞ LZW 0.105 iter/s 0.266 iter/s 270.68MiB ∞ ZStd 0.020 iter/s 0.518 iter/s 238.42MiB ∞ LZMA 0.009 iter/s 0.056 iter/s 247.61MiB ∞ ZIP 0.009 iter/s 0.301 iter/s 247.88MiB ∞ JPEG 0.446 iter/s 0.760 iter/s 18.59MiB 39.00 WebP 0.019 iter/s 0.330 iter/s 9.38MiB 37.78 ========== ============ ============= ========= ===== Please note that ``COMPRESSION_WEBP`` is self-assigned the id 50001 by the libtiff project and is not officially registered with Adobe since Adobe's registration function is defunct. * :c:func:`TIFFPrintDirectory`: fix null pointer dereference on corrupted file. Fixes :bugzilla:`Bug 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF image <2770>`. * :c:func:`_TIFFVGetField`: fix heap out-of-bounds access when requesting ``TIFFTAG_NUMBEROFINKS`` on a EXIF directory. Fixes :bugzilla:`Bug 2765 - Heap Out-Of-Bounds Memory Access - 68122422 <2765>`. Reported by Google Autofuzz project. * Fix a memory leak in :c:func:`TIFFStreamOpen`. :c:func:`TIFFStreamOpen` allocates a new ``tiff{o,i}s_data``, but if :c:func:`TIFFClientOpen` fails then that struct is leaked. * Fix for bug 2772. It is possible to craft a TIFF document where the IFD list is circular, leading to an infinite loop while traversing the chain. The libtiff directory reader has a failsafe that will break out of this loop after reading 65535 directory entries, but it will continue processing, consuming time and resources to process what is essentially a bogus TIFFdocument. This change fixes the above behavior by breaking out of processing when a TIFF document has >= 65535 directories and terminating with an error. * :c:func:`ChopUpSingleUncompressedStrip`: avoid memory exhaustion (:cve:`2017-11613`). In :c:func:`ChopUpSingleUncompressedStrip`, if the computed number of strips is big enough and we are in read only mode, validate that the file size is consistent with that number of strips to avoid useless attempts at allocating a lot of memory for the :c:member:`td_stripbytecount` and :c:member:`td_stripoffset` arrays. Fixes :bugzilla:`Bug 2724 - memory exhaustion in ChopUpSingleUncompressedStrip <2724>`. * Port code: Add :c:func:`strtol`, :c:func:`strtoll` and :c:func:`strtoull`. Also update :c:func:`strtoul`. All use the same implementation from NetBSD libc. * Fix for :cve:`2018-7456` "NULL pointer dereference in :c:func:`TIFFPrintDirectory`". * :c:func:`TIFFWriteDirectorySec`: avoid assertion. Fixes :bugzilla:`Bug 2795 - There is a reachable assertion abort in function TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead to remote denial of attack. (:cve:`2018-10963`) <2795>`. * :c:func:`LZWDecodeCompat`: fix potential index-out-of-bounds write. Fixes :bugzilla:`Bug 2780 - A heap-buffer-overflow in function LZWDecodeCompat in libtiff4.0.9 (:cve:`2018-8905`) <2780>`. The fix consists in using the similar code as :c:func:`LZWDecode` to validate we don't write outside of the output buffer. * Remove builtin support for GUI warning and error message boxes. Now warnings always go to the console by default unless applications define their own warning and error handlers. GUI applications (and Windows CE) are required to define such handlers. * Add tag and pseudo-tag definitions for ESRI LERC codec (out of tree codec whose source is at ``_. * Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API Fixes :bugzilla:`Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode <2800>`. * :c:func:`TIFFSetupStrips`: avoid potential :c:type:`uint32` overflow on 32-bit systems with large number of strips. Probably relates to :bugzilla:`Bug 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c (:cve:`2018-10779`) <2788>`. * Fix out-of-bound read on some tiled images. * Avoid potential :c:type:`int32` overflows in :c:func:`multiply_ms`. * Only read/write ``TIFFTAG_GROUP3OPTIONS`` or ``TIFFTAG_GROUP4OPTIONS`` if compression is ``COMPRESSION_CCITTFAX3`` or ``COMPRESSION_CCITTFAX4``. * JBIG: fix potential out-of-bounds write in :c:func:`JBIGDecode`. Also fix a (harmless) potential use of uninitialized memory when ``tif->tif_rawsize > tif->tif_rawcc``. In case libtiff is compiled with ``CHUNKY_STRIP_READ_SUPPORT``, make sure that whole strip data is provided to :c:func:`JBIGDecode`. * :c:func:`LZMAPreEncode`: emit verbose error if :c:func:`lzma_stream_encoder` fails (typically because not enough memory available) Tools changes ------------- * :program:`tiff2pdf`: Fix :cve:`2017-9935`, :bugzilla:`Bug 2704 - There is a heap based buffer overflow in the tiff2pdf tool of the libtiff library. A crafted TIFF document can lead to a heap based buffer overflow resulting in multiple damages. <2704>`. * :program:`pal2rgb`: Add workaround to pal2rgb buffer overflow. * :program:`tiffset`: Add support for :c:macro:`LONG8`, :c:macro:`SLONG8` and :c:macro:`IFD8` field types * :program:`tiff2bw`: avoid null pointer dereference in case of out of memory situation. Fixes :bugzilla:`Bug 2819 - There is a NULL pointer dereference at function LZWDecode in libtiff 4.0.9 (:cve:`2018-18661`) <2819>`. Contributed software changes ---------------------------- None Changes in TIFF v4.0.2 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.2 (:tag:`Release-v4-0-2`) Previous Version :doc:`v4.0.1 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here Major changes ------------- * None Software configuration changes ------------------------------ * None Library changes --------------- * :file:`tif_getimage.c`: added support for _SEPARATED CMYK images. * :file:`tif_getimage.c`: Added support for greyscale + alpha. * Added :c:func:`TIFFCreateCustomDirectory` and :file:`TIFFCreateEXIFDirectory` functions. * :file:`tif_print.c`: Lots of fixes around printing corrupt or hostile input. * Improve handling of corrupt ycbcrsubsampling values. * :file:`tif_unix.c`: use :c:func:`strerror` to get meaningful error messages. * :file:`tif_jpeg.c`: fix serious bugs in :c:func:`JPEGDecodeRaw`. * :file:`tif_jpeg.c`: Fix size overflow (zdi-can-1221, :cve:`2012-1173`). Tools changes ------------- * :program:`tiff2pdf`: Defend against integer overflows while calculating required buffer sizes (:cve:`2012-2113`). Contributed software changes ---------------------------- * None Changes in TIFF v4.0.3 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.3 (:tag:`Release-v4-0-3`) Previous Version :doc:`v4.0.2 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * Updated to use Automake 1.12.4. Avoids security problem with ``make distcheck`` (:cve:`2012-3386`). Library changes --------------- * Various memory buffer access fixes. * Fix handling when writing RGBA jpeg compressed imagery (:gdal-trac:`4732`). * Fix to work properly with IJG JPEG 7+. * New functions :c:func:`TIFFFieldTag`, :c:func:`TIFFFieldName`, :c:func:`TIFFFieldDataType`, :c:func:`TIFFFieldPassCount`, :c:func:`TIFFFieldReadCount`, :c:func:`TIFFFieldWriteCount` to use as external accessors for the opaque type :c:type:`TIFFField`. * Fix bug rewriting image tiles in a compressed file (:gdal-trac:`4771`). * Add TIFF/FX tag support in libtiff. Tools changes ------------- * :program:`tiff2pdf`: Fail when :c:func:`TIFFSetDirectory` fails. This prevents core dumps or perhaps even arbitrary code execution when processing a corrupt input file (:cve:`2012-3401`). * :program:`tiff2pdf`: Fix two places where :c:member:`t2p_error` didn't get set after a :c:func:`malloc` failure. No crash risk AFAICS, but the program might not report exit code 1 as desired. Contributed software changes ---------------------------- * None Changes in TIFF v4.0.4 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.4 (:tag:`Release-v4-0-4`) Previous Version :doc:`v4.0.4beta ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * :bugzilla:`2405`: Correct shell equality operator. * :bugzilla:`2498`: Adds an option to select the file I/O style on Windows hosts. Library changes --------------- * :c:func:`TIFFNumberOfDirectories`: Coverity 1134470 "Logically dead code" * :file:`tif_dirread.c`: * :c:func:`TIFFReadDirEntryDoubleArray`: Coverity 298626 "Logically dead code". * :c:func:`TIFFReadDirEntryFloatArray`: Coverity 298627 "Logically dead code". * :c:func:`TIFFReadDirEntryIfd8Array`: Coverity 298628 "Logically dead code". * :c:func:`TIFFReadDirEntrySlong8Array`: Coverity 298629 "Logically dead code" * :file:`tif_dirwrite.c` * :c:func:`_TIFFRewriteField`: Coverity 1024310 "Resource leak". * :file:`tif_jpeg.c` * :c:func:`JPEGCleanup`: Coverity 298624 "Dereference before null check". * :c:func:`JPEGDecode`: Coverity 602597 "Operands don't affect result". * :file:`tif_getimage.c` * :bugzilla:`2409`: Correct reading of certain tiled TIFFs. * :file:`tif_luv.c` * :c:func:`LogLuvDecodeStrip`: Coverity 991239 "Division or modulo by zero". * :c:func:`LogLuvDecodeTile`: Coverity 991227 "Division or modulo by zero". * :c:func:`LogLuvEncodeStrip`: Coverity 991240 "Division or modulo by zero". * :c:func:`LogLuvEncodeTile`: Coverity 991241 "Division or modulo by zero". * :file:`tif_lzw.c` * Decode files that contain consecutive :c:macro:`CODE_CLEAR` codes. * :file:`tif_ojpeg.c` * :c:func:`OJPEGReadBufferFill`: Coverity 603400 "Missing break in switch". * :c:func:`OJPEGReadHeaderInfoSecStreamDht`: Coverity 601720 "Resource leak". * :file:`tif_read.c` * :c:func:`TIFFStartTile`: Coverity 715973 and 715974 "Division or modulo by zero". * :file:`tif_unix.c` * :bugzilla:`2510`: Fix several harmless but still annoying warnings. * :file:`tif_write` * :c:func:`TIFFWriteEncodedStrip`: Coverity 715975 "Division or modulo by zero". * :c:func:`TIFFWriteEncodedTile`: Coverity 715976 and 715977 "Division or modulo by zero". * :c:func:`TIFFWriteRawStrip`: Coverity 715978 "Division or modulo by zero". * :c:func:`TIFFWriteScanline`: Coverity 715979 "Division or modulo by zero". Tools changes ------------- * :program:`bmp2tiff` * Coverity 1024225 "Untrusted value as argument". * Coverity 1024678 "Unchecked return value from library". * Coverity 1024679 "Unchecked return value from library". * Coverity 1214160 "Ignoring number of bytes read". * :program:`gif2tiff` * Coverity 1024222 "Untrusted value as argument". * Coverity 1024890 "Ignoring number of bytes read". * Coverity 1024891 "Ignoring number of bytes read". * Coverity 1024892 "Ignoring number of bytes read". * Coverity 1024893 "Ignoring number of bytes read". * Coverity 1024894 "Ignoring number of bytes read". * :program:`ras2tiff` * Corrected Sun Raster header definition to be safe for 64-bit systems. Add some header validations. Fixes many (unspecified) Coverity issues. * Coverity 1024223 "Untrusted value as argument". * Coverity 1301206: "Integer handling issues (BAD_SHIFT)". * :program:`raw2tiff` * Coverity 1024887 "Unchecked return value from library". * Coverity 1024888 "Unchecked return value from library". * Coverity 1024889 "Unchecked return value from library". * Coverity 1214162 "Ignoring number of bytes read". * :program:`tiff2pdf` * :bugzilla:`2078`: Suppress initial output of the header. * :bugzilla:`2150`: Change ColorTransform from "0" to "1". * Take care in using the return value from :c:func:`snprintf`. * Coverity 1024181 "Structurally dead code". * Coverity 1024181 "Structurally dead code". * Coverity 1227690 "Unused value". * Coverity 298621 "Resource leak". * :program:`tiff2ps` * Correct sizing and scaling problems with output document. * :program:`tiffcp` * Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak". * :program:`tiffcrop` * Correctly copy the compression tag from the source TIFF. * Coverity 1024545 "Division or modulo by zero". * Coverity 1024586 "Logically dead code". * Coverity 1024796 "Nesting level does not match indentation". * Coverity 1024797 "Nesting level does not match indentation". * Coverity 1294542 "Logical vs. bitwise operator". * Coverity 1299740 "Out-of-bounds write". * Coverity 1299741 "Dereference before null check". * :program:`tiffdither` * Check memory allocations for failure. Also check multiplication overflow. (Fixes #2501, :cve:`2014-8128`) * :program:`tiffgt.c` * :bugzilla:`2401`: Appropriately call :c:func:`glFlush`. * :program:`tiffmedian` * Coverity 1024386 "Out-of-bounds read". * Coverity 1024386 "Out-of-bounds read". * Coverity 1024795 "Nesting level does not match indentation". * Coverity 1024795 "Nesting level does not match indentation". :program:`tiffsplit` * Coverity 1024304 "Resource leak". * Coverity 1024305 "Resource leak". Contributed software changes ---------------------------- * :program:`addtiffo` * Check buffer size calculation for overflow. * Coverity 298615 "Resource leak". * Coverity 1024649 "Unintended sign extension". * :program:`iptcutil` * Coverity 1024468 "Infinite loop". * Coverity 1024727 "Truncated stdio return value". * Coverity 1214240 "Untrusted loop bound". Changes in TIFF v4.0.4beta ========================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.4beta (:tag:`Release-v4-0-4beta`) Previous Version :doc:`v4.0.3 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * Updated to use Automake 1.15 and Libtool 2.4.5 Library changes --------------- * :c:func:`TIFFCheckDirOffset`: avoid :c:type:`uint16` overflow when reading more than 65535 directories, and effectively error out when reaching that limit. * :c:func:`TIFFNumberOfDirectories`: generate error in case of directory count overflow. * :c:func:`TIFFAdvanceDirectory`: If nextdir is found to be defective, then set it to zero before returning error in order to terminate processing of truncated TIFF. * JPEG-in-TIFF: recognize ``SOF2``, ``SOF9`` and ``SOF10`` markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. Note: the default settings of mozjpeg will produce progressive scans, which is forbidden by the TechNote. * JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused all tiles/strips to include quantization tables even when the jpegtablesmode had the :c:macro:`JPEGTABLESMODE_QUANT` bit set. Also add explicit removal of Huffman tables when jpegtablesmode has the :c:macro:`JPEGTABLESMODE_HUFF` bit set, which avoids Huffman tables to be emitted in the first tile/strip (only useful in update scenarios. create-only was fine) * JPEG-in-TIFF: fix segfault in :c:func:`JPEGFixupTagsSubsampling` on corrupted image where ``tif->tif_dir.td_stripoffset == NULL``. (:bugzilla:`2471`) * NeXT codec: add new tests to check that we don't read outside of the compressed input stream buffer. * NeXT codec: check that ``BitsPerSample`` = 2. Fixes :bugzilla:`2487` (:cve:`2014-8129`) * NeXT codec: in the "run mode", use tilewidth for tiled images instead of imagewidth to avoid crash * tif_getimage.c: in OJPEG case, fix checks on strile width/height in the ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile`` and ``putcontig8bitYCbCr21tile`` cases. * in :c:func:`TIFFDefaultDirectory`, reset any already existing extended tags installed by user code through the extender mechaninm before calling the extender callback (GDAL #5054) * Fix warnings about unused parameters. * Fix various typos in comments found by Debian lintian tool (GDAL #5756) * tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. (:bugzilla:`2235`) * :file:`tif_dirread.c`: In :c:func:`EstimateStripByteCounts`, check return code of :c:func:`_TIFFFillStriles`. This solves crashing bug on corrupted images generated by afl. * :file:`tif_read.c`: fix several invalid comparisons of a :c:type:`uint64` value with ``<= 0`` by casting it to :c:type:`int64` first. This solves crashing bug on corrupted images generated by afl. * :c:func:`TIFFSetField`: refuse to set negative values for :c:macro:`TIFFTAG_XRESOLUTION` and :c:macro:`TIFFTAG_YRESOLUTION` that cause asserts when writing the directory * :c:func:`TIFFReadDirectory`: refuse to read ``ColorMap`` or ``TransferFunction`` if ``BitsPerSample`` has not yet been read, otherwise reading it later will cause user code to crash if ``BitsPerSample > 1`` * :c:func:`TIFFRGBAImageOK`: return FALSE if LOGLUV with ``SamplesPerPixel != 3``, or if CIELAB with ``SamplesPerPixel != 3`` or ``BitsPerSample != 8`` * :file:`tif_config.vc.h`: no longer use ``#define snprintf _snprintf`` with Visual Studio 2015 aka VC 14 aka MSVC 1900 * LZW codec: prevent potential null dereference of ``sp->dec_codetab`` in :c:func:`LZWPreDecode` (:bugzilla:`2459`) * :c:func:`TIFFReadBufferSetup`: avoid passing -1 size to :c:func:`TIFFmalloc` if passed user buffer size is 0 (:bugzilla:`2459`) * :c:func:`TIFFReadDirEntryOutputErr`: Incorrect count for tag should be a warning rather than an error since errors terminate processing. * :file:`tif_dirinfo.c` (``TIFFField``) : Fix data type for :c:macro:`TIFFTAG_GLOBALPARAMETERSIFD` tag. * Add definitions for TIFF/EP ``CFARepeatPatternDim`` and ``CFAPattern`` tags (:bugzilla:`2457`) * :file:`tif_codec.c`, :file:`tif_dirinfo.c`: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of ``sprintf(buf, ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)`` * :file:`configure.ac`: Improve pkg-config static linking by adding ``-lm`` to ``Libs.private`` when needed. * :file:`tif_write.c`: :c:type:`tmsize_t` related casting warning fixed for 64bit linux. * :file:`tif_read.c`: :c:type:`uint64`/:c:type:`tmsize_t` change for MSVC warnings. (:bugzilla:`2427`) * Fix :c:func:`TIFFPrintDirectory` handling of :c:member:`field_passcount` fields: it had the :c:macro:`TIFF_VARIABLE` and :c:macro:`TIFF_VARIABLE2` cases backwards. * PixarLog codec: Improve previous patch for :cve:`2012-4447` (to enlarge :c:member:`tbuf` for possible partial stride at end) so that overflow in the integer addition is detected. * :file:`tif_{unix,vms,win32}.c` (:c:func:`_TIFFmalloc`): ANSI C does not require :c:func:`malloc` to return :c:macro:`NULL` pointer if requested allocation size is zero. Assure that :c:func:`_TIFFmalloc` does. * :file:`tif_zip.c`: Avoid crash on :c:macro:`NULL` error messages. Tools changes ------------- * :program:`tiff2pdf` Fix various crashes and memory buffer access errors (oCERT-2014-013). * :program:`tiff2pdf` fix buffer overflow on some YCbCr JPEG compressed images. (:bugzilla:`2445`) * :program:`tiff2pdf` fix buffer overflow on YCbCr JPEG compressed image. (:bugzilla:`2443`) * :program:`tiff2pdf` check return code of :c:func:`TIFFGetField` when reading :c:macro:`TIFFTAG_SAMPLESPERPIXEL` * :program:`tiff2pdf` fix crash due to invalid tile count. * :program:`tiff2pdf` Detect invalid settings of ``BitsPerSample``/``SamplesPerPixel`` for CIELAB / ITULAB * :program:`tiff2pdf` Assure that memory size calculations for :c:func:`_TIFFmalloc` do not overflow the range of :c:type:`tmsize_t`. * :program:`tiff2pdf` Avoid crash when :c:macro:`TIFFTAG_TRANSFERFUNCTION` tag returns one channel, with the other two channels set to :c:macro:`NULL`. * :program:`tiff2pdf` close PDF file. (:bugzilla:`2479`) * :program:`tiff2pdf` Preserve input file directory order when pages are tagged with the same page number. * :program:`tiff2pdf.c` terminate after failure of allocating ycbcr buffer (:bugzilla:`2449`, :cve:`2013-4232`) * :program:`tiff2pdf` Rewrite JPEG marker parsing in :c:func:`t2p_process_jpeg_strip` to be at least marginally competent. The approach is still fundamentally flawed, but at least now it won't stomp all over memory when given bogus input. Fixes :cve:`2013-1960`. * :program:`tiffdump` Guard against arithmetic overflow when calculating allocation buffer sizes. * :program:`tiffdump` fix crash due to overflow of entry count. * :program:`tiffdump` Fix double-free bug. * :program:`tiffdump` detect cycle in TIFF directory chaining. (:bugzilla:`2463`) * :program:`tiffdump` avoid passing a :c:macro:`NULL` pointer to :c:func:`read` if :c:func:`seek` failed before. (:bugzilla:`2459`) * :program:`tiff2bw` when ``Photometric = RGB``, the utility only works if ``SamplesPerPixel = 3``. Enforce that. (:bugzilla:2485`, :cve:`2014-8127`) * :program:`pal2rgb`, :program:`thumbnail`: fix crash by disabling :c:macro:`TIFFTAG_INKNAMES` copying. (:bugzilla:`#2484`, :cve:`2014-8127`) * :program:`thumbnail` fix out-of-buffer write. (:bugzilla:`2489`, :cve:`2014-8128`) * :program:`thumbnail`, :program:`tiffcmp`: only read/write :c:macro:`TIFFTAG_GROUP3OPTIONS` or :c:macro:`TIFFTAG_GROUP4OPTIONS` if compression is :c:macro:`COMPRESSION_CCITTFAX3` or :c:macro:`COMPRESSION_CCITTFAX4`. (:bugzilla:`2493`, :cve:`2014-8128`) * :program:`tiffcp` fix crash when converting YCbCr JPEG-compressed to none. (:bugzilla:`2480`) * :program:`bmp2tiff` fix crash due to int overflow related to input BMP dimensions * :program:`tiffcrop` fix crash due to invalid ``TileWidth``/``TileHeight`` * :program:`tiffcrop` fix segfault if bad value passed to ``-Z`` option (:bugzilla:`2459`) and add missing ``va_end`` in :c:func:`dump_info` * :program:`thumbnail`, :program:`tiffcrop`: "fix" heap read over-run found with Valgrind and Address Sanitizer on test suite * :program:`fax2ps` check :c:func:`malloc`/:c:func:`realloc` result. (:bugzilla:`2470`) * :program:`gif2tiff` apply patch for :cve:`2013-4243`. (:bugzilla:`2451`) * :program:`gif2tiff` fix possible OOB write. (:bugzilla:`2452`, :cve:`2013-4244`) * :program:`gif2tiff` Be more careful about corrupt or hostile input files (:bugzilla:`2450`, :cve:`2013-4231`) * :program:`tiff2rgba` fix usage message in that zip was wrongly described * :program:`tiffinfo` Default various values fetched with :c:func:`TIFFGetField` to avoid being uninitialized. * :program:`tiff2ps` Fix bug in auto rotate option code. * :program:`ppm2tiff` avoid zero size buffer vulnerability (:cve:`2012-4564`). check the linebytes calculation too, get the :c:func:`max` calculation straight, avoid redundant error messages, check for :c:func:`malloc` failure. * :program:`tiffset` now supports a ``-u`` option to unset a tag. (:bugzilla:`2419`) * Fix warnings about unused parameters. * :program:`rgb2ycbcr`, :program:`tiff2bw`, :program:`tiff2pdf`, :program:`tiff2ps`, :program:`tiffcrop`, :program:`tiffdither`: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of ``sprintf(buf, ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to protect against overflow of fixed-size buffers. This responds in particular to :cve:`2013-1961` concerning overflow in :file:`tiff2pdf.c`'s :c:func:`t2p_write_pdf_page`. * :file:`html/man/tiff2ps.1.html`, :file:`html/man/tiffcp.1.html`, :file:`html/man/tiffdither.1.html`, :file:`man/tiff2ps.1`, :file:`man/tiffcp.1`, :file:`man/tiffdither.1`, :file:`tools/tiff2ps.c`, :file:`tools/tiffcp.c`, :file:`tools/tiffdither.c`: Sync tool usage printouts and man pages with reality Contributed software changes ---------------------------- * Fix warnings about variables set but not used. * :file:`contrib/dbs/xtiff/xtiff.c`: Enlarge some fixed-size buffers that weren't large enough, and eliminate substantially all uses of ``sprintf(buf, ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to protect against overflow of fixed-size buffers. Changes in TIFF v4.0.5 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.5 (:tag:`Release-v4-0-5`) Previous Version :doc:`v4.0.4 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Support for configure/build using CMake. * Support for large (> 2GB) files under Microsoft Windows. Software configuration changes ------------------------------ * :file:`CMakeLists.txt` / CMake * Configuration and building using CMake is now supported under Microsoft Windows and on Unix-type systems. * :file:`configure.ac` / :program:`configure` * Test for and use :c:func:`fseeko` if it is available. This allows supporting large files on Unix-type systems with a 32-bit :c:expr:`long` type and a 64-bit :c:type:`off_t` type. Library changes --------------- * :file:`tiffiop.h`: * Macros added to use 64-bit equivalents for all standard I/O and POSIX APIs used by libtiff and its tools which are limited to 2GB in Windows builds. Note that these 64-bit equivalents were introduced by the CRT provided with Visual Studio 2005 and if the necessary CRT is not installed on the target computer, the program will not run. The wrapper macros will not be activated unless the definition :c:macro:`_MSC_VER` is at least 1400 or :c:macro:``__MSVCRT_VERSION__`` is at least ``0x800``. * :file:`tif_unix.c`: * Updated to support large files under Microsoft Windows. This makes :file:`tif_unix.c` a completely viable candidate for use under Windows (in spite of its name) if the CRT is modern enough. Please note that :file:`tif_win32.c` already supported large files, but only :program:`tiffinfo` and :program:`tiffdump` made any provision to support large files under Windows. * :c:func:`_tiffReadProc` and :c:func:`_tiffWriteProc` are modified to chunk I/O to a maximum size of 2GB for extremely large I/O requests. This surmounts limitations in the Microsoft Windows :c:func:`read` and :c:func:`write` APIs (which are limited to the range of a 32-bit :c:expr:`int`), and may avoid poor behavior with extremely large I/O requests on other systems. Tools changes ------------- * All tools * Updated to use I/O wrapper macros from :file:`tiffiop.h` in order to support large files under Microsoft Windows. Contributed software changes ---------------------------- None Changes in TIFF v4.0.6 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.6 (:tag:`Release-v4-0-6`) Previous Version :doc:`v4.0.5 ` Master Download Site ``_ Master HTTP Site ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * Now builds with CMake 2.8.9 and newer (previously required 3.0.0) Software configuration changes ------------------------------ * :file:`CMakeLists.txt` / CMake * Supports CMake 2.8.9 and later. * Add missing file which wasn't being distributed, causing unit tests to fail. * Make shared/static library building configurable. * CMake reads all version information directly from :file:`configure.ac` to avoid duplication of values. * CMake builds are now included in ``distcheck`` target. * :file:`Makefile.am` * Autotools `make distcheck` now tests the CMake-based build if CMake is available. Library changes --------------- * Fixes to avoid undefined behaviour of signed types (C standard compliance). * Fixes to avoid possible isses when casting to unsigned char. * Fixes to avoid undefined behaviour with shifts. * Fix generation of output with 16 bit or 32 bit integer, when byte swapping is needed, in horizontal predictor (:bugzilla:`2521`). * Fix decoding when there is a single pixel to decode (unlikely case...) and byte swapping is involved. * Add add explicit masking with ``0xff`` before casting to :c:type:`uchar` in floating-point horizontal differencing and accumulation routines. * Eliminate requirement for and use of 64-bit constant values. Tools changes ------------- * :program:`tiffgt` * Silence glut API deprecation warnings on MacOS X. * :program:`fax2ps` * Detect failure to write to temporary file. Contributed software changes ---------------------------- None Changes in TIFF v4.0.7 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.7 (:tag:`Release-v4-0-7`) Previous Version :doc:`v4.0.6 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, :program:`ras2tiff`, :program:`sgi2tiff`, :program:`sgisv`, and :program:`ycbcr` are completely removed from the distribution. these tools were written in the late 1980s and early 1990s for test and demonstration purposes. In some cases the tools were never updated to support updates to the file format, or the file formats are now rarely used. In all cases these tools increased the libtiff security and maintenance exposure beyond the value offered by the tool. Software configuration changes ------------------------------ * None Library changes --------------- * :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, do not dereference :c:macro:`NULL` pointer when values of tags with :c:macro:`TIFF_SETGET_C16_ASCII` / :c:macro:`TIFF_SETGET_C32_ASCII` access are 0-byte arrays. Fixes :bugzilla:`2593` (regression introduced by previous fix done on 2016-11-11 for :cve:`2016-9297`). Reported by Henri Salo. Assigned as :cve:`2016-9448` * :file:`libtiff/tif_aux.c`: fix crash in :c:func:`TIFFVGetFieldDefaulted` when requesting Predictor tag and that the zip/lzw codec is not configured. Fixes :bugzilla:`2591` * :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, make sure that values of tags with :c:macro:`TIFF_SETGET_C16_ASCII` / :c:macro:`TIFF_SETGET_C32_ASCII` access are :c:macro:`NULL` terminated, to avoid potential read outside buffer in :c:func:`_TIFFPrintField`. Fixes :bugzilla:`2590` * :file:`libtiff/tif_dirread.c`: reject images with OJPEG compression that have no ``TileOffsets``/``StripOffsets`` tag, when OJPEG compression is disabled. Prevent :c:macro:`NULL` pointer dereference in :c:func:`TIFFReadRawStrip1` and other functions that expect :c:member:`td_stripbytecount` to be non :c:macro:`NULL`. Fixes :bugzilla:`2585` * :file:`libtiff/tif_strip.c`: make :c:func:`TIFFNumberOfStrips` return the ``td->td_nstrips`` value when it is non-zero, instead of recomputing it. This is needed in :c:macro:`TIFF_STRIPCHOP` mode where :c:member:`td_nstrips` is modified. Fixes a read outsize of array in :program:`tiffsplit` (or other utilities using :c:func:`TIFFNumberOfStrips`). Fixes :bugzilla:`2587` (:cve:`2016-9273`) * :file:`libtiff/tif_predict.h`, :file:`libtiff/tif_predict.c`: Replace assertions by runtime checks to avoid assertions in debug mode, or buffer overflows in release mode. Can happen when dealing with unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations * :file:`libtiff/tif_dir.c`: discard values of ``SMinSampleValue`` and ``SMaxSampleValue`` when they have been read and the value of ``SamplesPerPixel`` is changed afterwards (like when reading a OJPEG compressed image with a missing ``SamplesPerPixel`` tag, and whose photometric is ``RGB`` or ``YCbCr``, forcing ``SamplesPerPixel`` being 3). Otherwise when rewriting the directory (for example with tiffset, we will expect 3 values whereas the array had been allocated with just one), thus causing a out of bound read access. Fixes :bugzilla:`2500` (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) * :file:`libtiff/tif_dirwrite.c`: avoid :c:macro:`NULL` pointer dereference on :c:member:`td_stripoffset` when writing directory, if :c:macro:`FIELD_STRIPOFFSETS` was artificially set for a hack case in OJPEG case. Fixes :bugzilla:`2500` (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) * :file:`libtiff/tif_getimage.c` (:c:func:`TIFFRGBAImageOK`): Reject attempts to read floating point images. * :file:`libtiff/tif_predict.c` (:c:func:`PredictorSetup`): Enforce bits-per-sample requirements of floating point predictor (3). Fixes :cve:`2016-3622` "Divide By Zero in the :program:`tiff2rgba` tool." * :file:`libtiff/tif_pixarlog.c`: fix out-of-bounds write vulnerabilities in heap allocated buffers. Reported as MSVR 35094. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`libtiff/tif_write.c`: fix issue in error code path of :c:func:`TIFFFlushData1` that didn't reset the :c:member:`tif_rawcc` and :c:member:`tif_rawcp` members. I'm not completely sure if that could happen in practice outside of the odd behaviour of :c:func:`t2p_seekproc` of tiff2pdf). The report points that a better fix could be to check the return value of :c:func:`TIFFFlushData1` in places where it isn't done currently, but it seems this patch is enough. Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations team. * :file:`libtiff/tif_pixarlog.c`: Fix write buffer overflow in :c:func:`PixarLogEncode` if more input samples are provided than expected by :c:func:`PixarLogSetupEncode`. Idea based on :file:`libtiff-CVE-2016-3990.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro, but with different and simpler check. (:bugzilla:`2544`) * :file:`libtiff/tif_read.c`: Fix out-of-bounds read on memory-mapped files in :c:func:`TIFFReadRawStrip1` and :c:func:`TIFFReadRawTile1` when ``stripoffset`` is beyond :c:type:`tmsize_t` max value (reported by Mathias Svensson) * :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadEncodedStrip` and :c:func:`TIFFReadEncodedTile` directly use user provided buffer when no compression (and other conditions) to save a :c:func:`memcpy` * :file:`libtiff/tif_write.c`: make :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteEncodedTile` directly use user provided buffer when no compression to save a :c:func:`memcpy`. * :file:`libtiff/tif_luv.c`: validate that for :c:macro:`COMPRESSION_SGILOG` and :c:macro:`PHOTOMETRIC_LOGL`, there is only one sample per pixel. Avoid potential invalid memory write on corrupted/unexpected images when using the :c:func:`TIFFRGBAImageBegin` interface (reported by Clay Wood) * :file:`libtiff/tif_pixarlog.c`: fix potential buffer write overrun in :c:func:`PixarLogDecode` on corrupted/unexpected images (reported by Mathias Svensson) (:cve:`2016-5875`) * libtiff/libtiff.def: Added ``_TIFFMultiply32`` and ``_TIFFMultiply64`` to libtiff.def * :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Add a '1' to the :c:macro:`HAVE_SNPRINTF` definition. * :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Applied patch by Edward Lam to define :c:macro:`HAVE_SNPRINTF` for Visual Studio 2015. * :file:`libtiff/tif_dirread.c`: when compiled with :c:macro:`DEFER_STRILE_LOAD`, fix regression, introduced on 2014-12-23, when reading a one-strip file without a ``StripByteCounts`` tag. GDAL #6490 * :file:`libtiff/*`: upstream typo fixes (mostly contributed by Kurt Schwehr) coming from GDAL internal libtiff * :file:`libtiff/tif_fax3.h`: make :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` structure a :c:type:`uint16` to reduce size of the binary. * :file:`libtiff/tif_read.c`, :file:`tif_dirread.c`: fix indentation issues raised by GCC 6 ``-Wmisleading-indentation`` * :file:`libtiff/tif_pixarlog.c`: avoid zlib error messages to pass a :c:macro:`NULL` string to ``%s`` formatter, which is undefined behaviour in :c:func:`sprintf`. * :file:`libtiff/tif_next.c`: fix potential out-of-bound write in :c:func:`NeXTDecode` triggered by ``_ (:bugzilla:`2508`) * :file:`libtiff/tif_luv.c`: fix potential out-of-bound writes in decode functions in non debug builds by replacing :c:func:`assert` by regular ``if`` checks (:bugzilla:`2522`). Fix potential out-of-bound reads in case of short input data. * :file:`libtiff/tif_getimage.c`: fix out-of-bound reads in :c:type:`TIFFRGBAImage` interface in case of unsupported values of ``SamplesPerPixel``/``ExtraSamples`` for LogLUV / CIELab. Add explicit call to :c:func:`TIFFRGBAImageOK` in :c:func:`TIFFRGBAImageBegin`. Fix :cve:`2015-8665` reported by limingxing and :cve:`2015-8683` reported by zzf of Alibaba. * :file:`libtiff/tif_dirread.c`: workaround false positive warning of Clang Static Analyzer about :c:macro:`NULL` pointer dereference in :c:func:`TIFFCheckDirOffset`. * :file:`libtiff/tif_fax3.c`: remove dead assignment in :c:func:`Fax3PutEOLgdal`. Found by Clang Static Analyzer * :file:`libtiff/tif_dirwrite.c`: fix truncation to 32 bit of file offsets in :c:func:`TIFFLinkDirectory` and :c:func:`TIFFWriteDirectorySec` when aligning directory offsets on a even offset (affects BigTIFF). This was a regression of the changeset of 2015-10-19. * :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteEncodedTile` should return -1 in case of failure of :c:func:`tif_encodestrip` as documented * :file:`libtiff/tif_dumpmode.c`: :c:func:`DumpModeEncode` should return 0 in case of failure so that the above mentioned functions detect the error. * :file:`libtiff/*.c`: fix MSVC warnings related to cast shortening and assignment within conditional expression * :file:`libtiff/*.c`: fix clang -Wshorten-64-to-32 warnings * :file:`libtiff/tif_dirread.c`: prevent reading ColorMap or TransferFunction if ``BitsPerPixel`` > 24, so as to avoid huge memory allocation and file read attempts * :file:`libtiff/tif_dirread.c`: remove duplicated assignment (reported by Clang static analyzer) * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_compress.c`, :file:`libtiff/tif_jpeg_12.c`: suppress warnings about 'no previous declaration/prototype' * :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirwrite.c`: suffix constants by U to fix 'warning: negative integer implicitly converted to unsigned type' warning (part of ``-Wconversion``) * :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_print.c`: fix ``-Wshadow`` warnings (only in :file:`libtiff/`) Tools changes ------------- * tools/Makefile.am: The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, :program:`ras2tiff`, :program:`sgi2tiff`, :program:`sgisv`, and :program:`ycbcr` are completely removed from the distribution. The libtiff tools :program:`rgb2ycbcr` and :program:`thumbnail` are only built in the build tree for testing. Old files are put in new :file:`archive` subdirectory of the source repository, but not in distribution archives. These changes are made in order to lessen the maintenance burden. * :file:`tools/tiff2pdf.c`: avoid undefined behaviour related to overlapping of source and destination buffer in :c:func:`memcpy` call in :c:func:`t2p_sample_rgbaa_to_rgb` Fixes :bugzilla:`2577` * :file:`tools/tiff2pdf.c`: fix potential integer overflows on 32 bit builds in :c:func:`t2p_read_tiff_size` Fixes :bugzilla:`2576` * :file:`tools/fax2tiff.c`: fix segfault when specifying ``-r`` without argument. Patch by Yuriy M. Kaminskiy. Fixes :bugzilla:`2572` * :file:`tools/tiffinfo.c`: fix out-of-bound read on some tiled images. (:bugzilla:`2517`) * :file:`tools/tiffcrop.c`: fix multiple uint32 overflows in :c:func:`writeBufferToSeparateStrips`, :c:func:`writeBufferToContigTiles` and :c:func:`writeBufferToSeparateTiles` that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes :bugzilla:`2592` * :file:`tools/tiffcrop.c`: fix out-of-bound read of up to 3 bytes in :c:func:`readContigTilesIntoBuffer`. Reported as MSVR 35092 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2pdf.c`: fix write buffer overflow of 2 bytes on JPEG compressed images. Reported by Tyler Bohan of Cisco Talos as TALOS-CAN-0187 / :cve:`2016-5652`. Also prevents writing 2 extra uninitialized bytes to the file stream. * :file:`tools/tiffcp.c`: fix out-of-bounds write on tiled images with odd tile width vs image width. Reported as MSVR 35103 by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2pdf.c`: fix read -largely- outsize of buffer in :c:func:`t2p_readwrite_pdf_image_tile`, causing crash, when reading a JPEG compressed image with :c:macro:`TIFFTAG_JPEGTABLES` length being one. Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiffcp.c`: fix read of undefined variable in case of missing required tags. Found on test case of MSVR 35100. * :file:`tools/tiffcrop.c`: fix read of undefined buffer in :c:func:`readContigStripsIntoBuffer` due to uint16 overflow. Probably not a security issue but I can be wrong. Reported as MSVR 35100 by Axel Souchet from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiffcrop.c`: fix various out-of-bounds write vulnerabilities in heap or stack allocated buffers. Reported as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2pdf.c`: fix out-of-bounds write vulnerabilities in heap allocate buffer in :c:func:`t2p_process_jpeg_strip`. Reported as MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * :file:`tools/tiff2bw.c`: fix weight computation that could result of color value overflow (no security implication). Fix :bugzilla:`2550`. Patch by Frank Freudenberg. * :file:`tools/rgb2ycbcr.c`: validate values of ``-v`` and ``-h`` parameters to avoid potential divide by zero. Fixes :cve:`2016-3623` (:bugzilla:`2569`) * :file:`tools/tiffcrop.c`: Fix out-of-bounds write in :c:func:`loadImage`. From patch :file:`libtiff-CVE-2016-3991.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro (:bugzilla:`2543`) * :file:`tools/tiff2rgba.c`: Fix integer overflow in size of allocated buffer, when ``-b`` mode is enabled, that could result in out-of-bounds write. Based initially on patch :file:`tiff-CVE-2016-3945.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro, with correction for invalid tests that rejected valid files. (:bugzilla:`2545`) * :file:`tools/tiffcrop.c`: Avoid access outside of stack allocated array on a tiled separate TIFF with more than 8 samples per pixel. Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 (:cve:`2016-5321` / :cve:`2016-5323` , :bugzilla:`2558` / :bugzilla:`2559`) * :file:`tools/tiffdump.c`: fix a few misaligned 64-bit reads warned by ``-fsanitize`` * :file:`tools/tiffdump.c` (:c:func:`ReadDirectory`): Remove :c:type:`uint32` cast to :c:func:`_TIFFmalloc` argument which resulted in Coverity report. Added more mutiplication overflow checks. Contributed software changes ---------------------------- None Changes in TIFF v4.0.8 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.8 (:tag:`Release-v4-0-8`) Previous Version :doc:`v4.0.7 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * None Library changes --------------- * :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_open.c`: add parenthesis to fix cppcheck ``clarifyCalculation`` warnings * :file:`libtiff/tif_predict.c`, :file:`libtiff/tif_print.c`: fix printf unsigned vs signed formatting (cppcheck ``invalidPrintfArgType_uint`` warnings) * :file:`libtiff/tif_read.c`, :file:`libtiff/tiffiop.h`: fix :c:type:`uint32` overflow in :c:func:`TIFFReadEncodedStrip` that caused an integer division by zero. Reported by Agostino Sarubbo. Fixes :bugzilla:`2596` * :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_luv.c`: fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ``ColorMap``, ``TransferFunction`` attached and nasty plays with ``bitspersample``. The fix for LUV has not been tested, but suffers from the same kind of issue of PixarLog. Reported by Agostino Sarubbo. Fixes :bugzilla:`2604` * :file:`libtiff/tif_strip.c`: revert the change in :c:func:`TIFFNumberOfStrips` done for :bugzilla:`2587` / :cve:`2016-9273` since the above change is a better fix that makes it unnecessary. * :file:`libtiff/tif_dirread.c`: modify :c:func:`ChopUpSingleUncompressedStrip` to instantiate compute ``nstrips`` as ``TIFFhowmany_32(td->td_imagelength, rowsperstrip)``, instead of a logic based on the total size of data. Which is faulty is the total size of data is not sufficient to fill the whole image, and thus results in reading outside of the ``StripByCounts``/``StripOffsets`` arrays when using :c:func:`TIFFReadScanline`. Reported by Agostino Sarubbo. Fixes :bugzilla:`2608`. * :file:`libtiff/tif_ojpeg.c`: make :c:func:`OJPEGDecode` early exit in case of failure in :c:func:`OJPEGPreDecode`. This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes :bugzilla:`2611` * :file:`libtiff/tif_write.c`: fix misleading indentation as warned by GCC. * :file:`libtiff/tif_fax3.h`: revert change done on 2016-01-09 that made :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` structure a :c:type:`uint16` to reduce size of the binary. It happens that the Hylafax software uses the tables that follow this typedef (:c:var:`TIFFFaxMainTable`, :c:var:`TIFFFaxWhiteTable`, :c:var:`TIFFFaxBlackTable`), although they are not in a public libtiff header. Raised by Lee Howard. Fixes :bugzilla:`2636` * :file:`libtiff/tiffio.h`, :file:`libtiff/tif_getimage.c`: add :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` variants of the functions without ext, with an extra argument to control the ``stop_on_error`` behaviour. * :file:`libtiff/tif_getimage.c`: fix potential memory leaks in error code path of :c:func:`TIFFRGBAImageBegin`. Fixes :bugzilla:`2627` * :file:`libtiff/tif_jpeg.c`: increase libjpeg max memory usable to 10 MB instead of libjpeg 1MB default. This helps when creating files with "big" tile, without using libjpeg temporary files. Related to https://trac.osgeo.org/gdal/ticket/6757 * :file:`libtiff/tif_jpeg.c`: avoid integer division by zero in :c:func:`JPEGSetupEncode` when horizontal or vertical sampling is set to 0. Fixes :bugzilla:`2653` * :file:`libtiff/tif_dirwrite.c`: in :c:func:`TIFFWriteDirectoryTagCheckedRational`, replace assertion by runtime check to error out if passed value is strictly negative. Fixes :bugzilla:`2535` * :file:`libtiff/tif_dirread.c`: avoid division by floating point 0 in :c:func:`TIFFReadDirEntryCheckedRational` and :c:func:`TIFFReadDirEntryCheckedSrational`, and return 0 in that case (instead of infinity as before presumably) Apparently some sanitizers do not like those divisions by zero. Fixes :bugzilla:`2644` * :file:`libtiff/tif_dir.c`, :file:`tif_dirread.c`, :file:`tif_dirwrite.c`: implement various clampings of double to other data types to avoid undefined behaviour if the output range isn't big enough to hold the input value. Fixes :bugzilla:`2643`, :bugzilla:`2642`, :bugzilla:`2646`, :bugzilla:`2647` * :file:`libtiff/tif_jpeg.c`: validate ``BitsPerSample`` in :c:func:`JPEGSetupEncode` to avoid undefined behaviour caused by invalid shift exponent. Fixes :bugzilla:`2648` * :file:`libtiff/tif_read.c`: avoid potential undefined behaviour on signed integer addition in :c:func:`TIFFReadRawStrip1` in :c:func:`isMapped` case. Fixes :bugzilla:`2650` * :file:`libtiff/tif_getimage.c`: add explicit :c:func:`uint32` cast in :c:var:`putagreytile` to avoid ``UndefinedBehaviorSanitizer`` warning. Patch by Nicolás Peña. Fixes :bugzilla:`2658` * :file:`libtiff/tif_read.c`: :c:func:`TIFFReadBufferSetup`: use :c:func:`_TIFFcalloc` to zero initialize :c:member:`tif_rawdata`. Fixes :bugzilla:`2651` * :file:`libtiff/tiffio.h`, :file:`tif_unix.c`, :file:`tif_win32.c`, :file:`tif_vms.c`: add :c:func:`_TIFFcalloc` * :file:`libtiff/tif_luv.c`, :file:`tif_lzw.c`, :file:`tif_packbits.c`: return 0 in Encode functions instead of -1 when :c:func:`TIFFFlushData1` fails. Fixes :bugzilla:`2130` * :file:`libtiff/tif_ojpeg.c`: fix leak in :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and :c:func:`OJPEGReadHeaderInfoSecTablesAcTable` when read fails. Patch by Nicolás Peña. Fixes :bugzilla:`2659` * :file:`libtiff/tif_jpeg.c`: only run :c:func:`JPEGFixupTagsSubsampling` if the ``YCbCrSubsampling`` tag is not explicitly present. This helps a bit to reduce the I/O amount when the tag is present (especially on cloud hosted files). * :file:`libtiff/tif_lzw.c`: in :c:func:`LZWPostEncode`, increase, if necessary, the code bit-width after flushing the remaining code and before emitting the EOI code. Fixes :bugzilla:`1982` * :file:`libtiff/tif_pixarlog.c`: fix memory leak in error code path of :c:func:`PixarLogSetupDecode`. Patch by Nicolás Peña. Fixes :bugzilla:`2665` * :file:`libtiff/tif_fax3.c`, :file:`tif_predict.c`, :file:`tif_getimage.c`: fix GCC 7 ``-Wimplicit-fallthrough`` warnings. * :file:`libtiff/tif_dirread.c`: fix memory leak in non :c:macro:`DEFER_STRILE_LOAD` mode (ie default) when there is both a ``StripOffsets`` and ``TileOffsets`` tag, or a ``StripByteCounts`` and ``TileByteCounts``. Fixes :bugzilla:`2689` * :file:`libtiff/tif_ojpeg.c`: fix potential memory leak in :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and :c:func:`OJPEGReadHeaderInfoSecTablesAcTable`. Patch by Nicolás Peña. Fixes :bugzilla:`2670` * :file:`libtiff/tif_fax3.c`: avoid crash in :c:func:`Fax3Close` on empty file. Patch by Alan Coopersmith + complement by myself. Fixes :bugzilla:`2673` * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip`: add limitation to the number of bytes read in case ``td_stripbytecount[strip]`` is bigger than reasonable, so as to avoid excessive memory allocation. * :file:`libtiff/tif_zip.c`, :file:`tif_pixarlog.c`, :file:`tif_predict.c`: fix memory leak when the underlying codec (ZIP, PixarLog) succeeds its :c:func:`setupdecode` method, but :c:func:`PredictorSetup` fails. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` and :c:func:`TIFFFillTile`: avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds and non-mapped cases. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial` / :c:func:`TIFFSeek`, avoid potential integer overflows with read_ahead in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. Should especially occur on 32 bit platforms. * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial`: avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_read.c`: update :c:member:`tif_rawcc` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with :c:member:`tif_rawdataloaded` when calling :c:func:`TIFFStartStrip` or :c:func:`TIFFFillStripPartial`. This avoids reading beyond :c:func:`tif_rawdata` when ``bytecount > tif_rawdatasize``. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. Credit to OSS-Fuzz * :file:`libtiff/tif_color.c`: avoid potential :c:type:`int32` overflow in :c:func:`TIFFYCbCrToRGBInit`. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 Credit to OSS-Fuzz * :file:`libtiff/tif_pixarlog.c`, :file:`tif_luv.c`: avoid potential :c:type:`int32` overflows in :c:func:`multiply_ms` and :c:func:`add_ms`. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 Credit to OSS-Fuzz * :file:`libtiff/tif_packbits.c`: fix out-of-buffer read in :c:func:`PackBitsDecode`. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 Credit to OSS-Fuzz * :file:`libtiff/tif_luv.c`: :c:func:`LogL16InitState`: avoid excessive memory allocation when ``RowsPerStrip`` tag is missing. Credit to OSS-Fuzz (locally run, on GDAL) * :file:`libtiff/tif_lzw.c`: update dec_bitsleft at beginning of LZWDecode(), and update tif_rawcc at end of LZWDecode(). This is needed to properly work with the latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. * :file:`libtiff/tif_pixarlog.c`: :c:func:`PixarLogDecode`: resync :c:member:`tif_rawcp` with :c:member:`next_in` and :c:member:`tif_rawcc` with :c:member:`avail_in` at beginning and end of function, similarly to what is done in :c:func:`LZWDecode`. Likely needed so that it works properly with latest chnges in :file:`tif_read.c` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. But untested... * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: add basic validation of :c:var:`luma` and :c:var:`refBlackWhite` coefficients (just check they are not NaN for now), to avoid potential :c:expr:`float` to :c:expr:`int` overflows. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter validation for :c:var:`refBlackWhite` coefficients values. To avoid invalid :c:expr:`float` to :c:expr:`int32` conversion. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 Credit to OSS Fuzz Tools changes ------------- * :file:`tools/fax2tiff.c` (:c:func:`main`): Applied patch by Jörg Ahrens to fix passing client data for Win32 builds using :file:`tif_win32.c` (:c:macro:`USE_WIN32_FILEIO` defined) for file I/O. Patch was provided via email on November 20, 2016. * :file:`tools/tiffcp.c`: avoid :c:type:`uint32` underflow in :c:func:`cpDecodedStrips` that can cause various issues, such as buffer overflows in the library. Reported by Agostino Sarubbo. Fixes :bugzilla:`2598` * :file:`tools/tiffcrop.c`: fix :c:func:`readContigStripsIntoBuffer` in ``-i`` (ignore) mode so that the output buffer is correctly incremented to avoid write outside bounds. Reported by Agostino Sarubbo. Fixes :bugzilla:`2620` * :file:`tools/tiffcrop.c`: add 3 extra bytes at end of strip buffer in :c:func:`readSeparateStripsIntoBuffer` to avoid read outside of heap allocated buffer. Reported by Agostino Sarubbo. Fixes :bugzilla:`2621` * :file:`tools/tiffcrop.c`: fix integer division by zero when ``BitsPerSample`` is missing. Reported by Agostino Sarubbo. Fixes :bugzilla:`2619` * :file:`tools/tiffinfo.c`: fix null pointer dereference in ``-r`` mode when the image has no ``StripByteCount`` tag. Reported by Agostino Sarubbo. Fixes :bugzilla:`2594` * :file:`tools/tiffcp.c`: avoid potential division by zero if ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. Fixes :bugzilla:`2597` * :file:`tools/tif_dir.c`: when ``TIFFGetField(, TIFFTAG_NUMBEROFINKS, )`` is called, limit the return number of inks to ``SamplesPerPixel``, so that code that parses ink names doesn't go past the end of the buffer. Reported by Agostino Sarubbo. Fixes :bugzilla:`2599` * :file:`tools/tiffcp.c`: avoid potential division by zero if ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. Fixes :bugzilla:`2607` * :file:`tools/tiffcp.c`: fix :c:type:`uint32` underflow/overflow that can cause heap-based buffer overflow. Reported by Agostino Sarubbo. Fixes :bugzilla:`2610` * :file:`tools/tiffcp.c`: replace ``assert( (bps % 8) == 0 )`` by a non assert check. Reported by Agostino Sarubbo. Fixes :bugzilla:`2605` * :file:`tools/tiff2ps.c`: fix 2 heap-based buffer overflows (in :c:func:`PSDataBW` and :c:func:`PSDataColorContig`). Reported by Agostino Sarubbo. Fixes :bugzilla:`2633` and :bugzilla:`2634`. * :file:`tools/tiff2pdf.c`: prevent heap-based buffer overflow in ``-j`` mode on a paletted image. Note: this fix errors out before the overflow happens. There could probably be a better fix. Fixes :bugzilla:`2635` * :file:`tools/tiff2pdf.c`: fix wrong usage of :c:func:`memcpy` that can trigger unspecified behaviour. Fixes :bugzilla:`2638` * :file:`tools/tiff2pdf.c`: avoid potential invalid memory read in :c:func:`t2p_writeproc`. Fixes :bugzilla:`2639` * :file:`tools/tiff2pdf.c`: avoid potential heap-based overflow in :c:func:`t2p_readwrite_pdf_image_tile`. Fixes :bugzilla:`2640` * :file:`tools/tiffcrop.c`: remove extraneous :c:func:`TIFFClose` in error code path, that caused double free. Related to :bugzilla:`2535` * :file:`tools/tiffcp.c`: error out cleanly in :c:func:`cpContig2SeparateByRow` and :c:func:`cpSeparate2ContigByRow` if ``BitsPerSample != 8`` to avoid heap based overflow. Fixes :bugzilla:`2656` and :bugzilla:`2657` * :file:`tools/raw2tiff.c`: avoid integer division by zero. Fixes :bugzilla:`2631` * :file:`tools/tiff2ps.c`: call :c:func:`TIFFClose` in error code paths. * :file:`tools/fax2tiff.c`: emit appropriate message if the input file is empty. Patch by Alan Coopersmith. Fixes :bugzilla:`2672` * :file:`tools/tiff2bw.c`: close :c:struct:`TIFF` handle in error code path. Fixes :bugzilla:`2677` Contributed software changes ---------------------------- None Changes in TIFF v4.0.9 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.0.9 (:tag:`Release-v4-0-9`) Previous Version :doc:`v4.0.8 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here: Major changes ------------- * None Software configuration changes ------------------------------ * :file:`test/Makefile.am`: Add some tests for tiff2bw. * :file:`.appveyor.yml`, :file:`.travis.yml`, :file:`build/travis-ci`: apply patches :file:`0001-ci-Travis-script-improvements.patch` and :file:`0002-ci-Invoke-helper-script-via-shell.patch` by Roger Leigh (sent to mailing list) * :file:`.travis.yml`, :file:`build/travis-ci`: new files from :file:`0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch` by Roger Leigh (sent to mailing list on 2017-06-08). This patch adds support for the Travis-CI service. * :file:`.appveyor.yml`: new file from :file:`0002-ci-Add-AppVeyor-support.patch` by Roger Leigh (sent to mailing list on 2017-06-08). This patch adds a :file:`.appveyor.yml` file to the top-level. This allows one to opt in to having a branch built on Windows with Cygwin, MinGW and MSVC automatically when a branch is pushed to GitHub, GitLab, BitBucket or any other supported git hosting service. * :file:`CMakeLists.txt`, :file:`test/CMakeLists.txt`, :file:`test/TiffTestCommon.cmake`: apply patch :file:`0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch` from Roger Leigh (sent to mailing list on 2017-06-08). This patch makes the CMake build system support running the tests with MinGW or Cygwin. * :file:`test/tiffcp-lzw-compat.sh`, :file:`test/images/quad-lzw-compat.tiff`: new files to test old-style LZW decompression * :file:`test/common.sh`, :file:`Makefile.am`, :file:`CMakeList.txt`: updated with above * :file:`test/Makefile.am`: add missing reference to images/quad-lzw-compat.tiff to fix ``make distcheck``. Patch by Roger Leigh * :file:`nmake.opt`: support a ``DEBUG=1`` option, so as to adjust ``OPTFLAGS`` and use ``/MDd`` runtime in debug mode. Library changes --------------- * :file:`libtiff/tif_color.c`: :c:func:`TIFFYCbCrToRGBInit`: stricter clamping to avoid :c:type:`int32` overflow in :c:func:`TIFFYCbCrtoRGB`. Fixes :oss-fuzz:`1844`. Credit to OSS Fuzz * :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter validation for ``refBlackWhite`` coefficients values. To avoid invalid ``float->int32`` conversion (when ``refBlackWhite[0] == 2147483648.f``) Fixes :oss-fuzz:`1907`. Credit to OSS Fuzz * :file:`libtiff/tif_dirinfo.c`, :file:`tif_dirread.c`: add :c:func:`_TIFFCheckFieldIsValidForCodec`, and use it in :c:func:`TIFFReadDirectory` so as to ignore fields whose tag is a codec-specified tag but this codec is not enabled. This avoids :c:func:`TIFFGetField` to behave differently depending on whether the codec is enabled or not, and thus can avoid stack based buffer overflows in a number of TIFF utilities such as :program:`tiffsplit`, :program:`tiffcmp`, :program:`thumbnail`, etc. Patch derived from :file:`0063-Handle-properly-CODEC-specific-tags.patch` (:bugzilla:`2580`) by Raphaël Hertzog. Fixes: :bugzilla:`2580`, :bugzilla:`2693`, :bugzilla:`2625` (:cve:`2016-10095`), :bugzilla:`2564` (:cve:`2015-7554`), :bugzilla:`2561` (:cve:`2016-5318`), :bugzilla:`2499` (:cve:`2014-8128`), :bugzilla:`2441`, :bugzilla:`2433`. * :file:`libtiff/tif_swab.c`: if :c:macro:`DISABLE_CHECK_TIFFSWABMACROS` is defined, do not do the ``#ifdef TIFFSwabXXX`` checks. Make it easier for GDAL to rename the symbols of its internal libtiff copy. * :file:`libtiff/tif_dirread.c`: fix regression of libtiff 4.0.8 in :c:func:`ChopUpSingleUncompressedStrip` regarding update of newly single-strip uncompressed files whose bytecount is 0. Before the change of 2016-12-03, the condition ``bytecount==0`` used to trigger an early exit/disabling of strip chop. Re-introduce that in update mode. Otherwise this cause later incorrect setting for the value of ``StripByteCounts``/``StripOffsets``. (:gdal-trac:`6924`). * :file:`libtiff/tif_dirread.c`: :c:func:`TIFFFetchStripThing`: limit the number of items read in ``StripOffsets``/``StripByteCounts`` tags to the number of strips to avoid excessive memory allocation. Fixes :oss-fuzz:`2215`. Credit to OSS Fuzz * :file:`libtiff/tif_getimage.c`: avoid many (harmless) :c:expr:`unsigned int` overflows. * :file:`libtiff/tif_fax3.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`Fax3Encode2DRow`. Could potentially be a bug with huge rows. * :file:`libtiff/tif_jpeg.c`: avoid (harmless) :c:expr:`unsigned int` overflow on tiled images. * :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` and ``BYTECOUNTLOOKSBAD`` when file is too short. * :file:`libtiff/tif_predict.c`: decorate legitimate functions where :c:expr:`unsigned int` overflow occur with :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` * :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` * :file:`libtiff/tiffiop.h`: add :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` macro to disable CLang warnings raised by ``-fsanitize=undefined,unsigned-integer-overflow`` * :file:`libtiff/tif_jpeg.c`: add anti-denial of service measure to avoid excessive CPU consumption on progressive JPEGs with a huge number of scans. See ``_. .. note:: Only affects libtiff since 2014-12-29 where support of non-baseline JPEG was added. * :file:`libtiff/tif_jpeg.c`: error out at decoding time if anticipated libjpeg memory allocation is above 100 MB. libjpeg in case of multiple scans, which is allowed even in baseline JPEG, if components are spread over several scans and not interleavedin a single one, needs to allocate memory (or backing store) for the whole strip/tile. See ``_. This limitation may be overridden by setting the ``LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC`` environment variable, or recompiling libtiff with a custom value of :c:macro:`TIFF_LIBJPEG_LARGEST_MEM_ALLOC` macro. * :file:`libtiff/tif_jbig.c`: fix memory leak in error code path of :c:func:`JBIGDecode`. Fixes :bugzilla:`2706`. Reported by team OWL337 * :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFReadDirEntryFloat`, check that a double value can fit in a float before casting. Patch by Nicolas RUFF * :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_jpeg_12.c`, :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadScanline` works in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with JPEG stream with multiple scans. Also make configurable through a ``LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER`` environment variable the maximum number of scans allowed. Defaults to 100. * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillTile`: add limitation to the number of bytes read in case td_stripbytecount[strip] is bigger than reasonable, so as to avoid excessive memory allocation (similarly to what was done for :c:func:`TIFFFileStrip` on 2017-05-10) * :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadEncodedStripAndAllocBuffer`. Fixes :bugzilla:`2708` and :oss-fuzz:`2433`. Credit to OSS Fuzz * :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedStripAndAllocBuffer` function, variant of :c:func:`TIFFReadEncodedStrip` that allocates the decoded buffer only after a first successful :c:func:`TIFFFillStrip`. This avoids excessive memory allocation on corrupted files. * :file:`libtiff/tif_dirwrite.c`: in :c:func:`TIFFWriteDirectoryTagCheckedXXXX` functions associated with LONG8/SLONG8 data type, replace assertion that the file is BigTIFF, by a non-fatal error. Fixes :bugzilla:`2712` Reported by team OWL337 * :file:`libtiff/tif_read.c`: :c:func:`TIFFStartTile`: set tif_rawcc to tif_rawdataloaded when it is set. Similarly to :c:func:`TIFFStartStrip`. This issue was revealed by the change of 2017-06-30 in :c:func:`TIFFFileTile`, limiting the number of bytes read. But it could probably have been hit too in CHUNKY_STRIP_READ_SUPPORT mode previously ? Fixes :oss-fuzz:`2454` Credit to OSS Fuzz * :file:`libtiff/tif_error.c, tif_warning.c`: correctly use va_list when both an old-style and new-style warning/error handlers are installed. Patch by Paavo Helde (sent on the mailing list) * :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadTileAndAllocBuffer`. Fixes :oss-fuzz:`2470` Credit to OSS Fuzz. * :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedTileAndAllocBuffer` and :c:func:`_TIFFReadTileAndAllocBuffer` variants of :c:func:`TIFFReadEncodedTile` and :c:func:`TIFFReadTile` that allocates the decoded buffer only after a first successful :c:func:`TIFFFillTile`. This avoids excessive memory allocation on corrupted files. * :file:`libtiff/tif_pixarlog.c`: avoid excessive memory allocation on decoding when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) Fixes :oss-fuzz:`2554` Credit to OSS Fuzz * :file:`libtiff/tif_lzw.c`: fix 4.0.8 regression in the decoding of old-style LZW compressed files. * :file:`libtiff/tif_lzw.c`: fix potential out-of-buffer read on 1-byte LZW strips. Crashing issue only on memory mapped files, where the strip offset is the last byte of the file, and the file size is a multiple of one page size on the CPU architecture (typically 4096). Credit to myself :-) * :file:`libtiff/tif_dir.c`: avoid potential null pointer dereference in :c:func:`_TIFFVGetField` on corrupted TIFFTAG_NUMBEROFINKS tag instance. Fixes :bugzilla:`2713` * :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" mode on ``PlanarConfig=Contig`` input images. Fixes :bugzilla:`2715` Reported by team OWL337 * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. Complementary fix for :bugzilla:`2708` in the :c:func:`isMapped` case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated. * :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. Complementary fix for :bugzilla:`2708` in the :c:func:`isMapped` case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated. * :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the arrays that hold StripOffsets/StripByteCounts, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes :oss-fuzz:`2350` Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the arrays that hold ``StripOffsets``/``StripByteCounts``, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes :oss-fuzz:`2350` Credit to OSS Fuzz * :file:`libtiff/tif_read.c`: add protection against excessive memory allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes :bugzilla:`2675` * :file:`libtiff/tif_read.c`: add protection against excessive memory allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes :bugzilla:`2675` * :file:`libtiff/tif_luv.c`: :c:func:`LogLuvInitState`: avoid excessive memory allocation when ``RowsPerStrip`` tag is missing. Fixes :oss-fuzz:`2683` Credit to OSS-Fuzz * :file:`libtiff/tif_getimage.c`: :c:func:`gtTileContig` and :c:func:`gtTileSeparate`: properly break from loops on error when ``stoponerr`` is set, instead of going on iterating on row based loop. * :file:`libtiff/tif_getimage.c`: fix fromskew computation when to-be-skipped pixel number is not a multiple of the horizontal subsampling, and also in some other cases. Impact ``putcontig8bitYCbCr44tile``, ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile``, ``putcontig8bitYCbCr21tile`` and ``putcontig8bitYCbCr12tile``. Fixes :bugzilla:`2637` (discovered by Agostino Sarubbo) and :oss-fuzz:`2691` (credit to OSS Fuzz) * :file:`libtiff/tif_luv.c`: further reduce memory requirements for temporary buffer when ``RowsPerStrip >= image_length`` in :c:func:`LogLuvInitState` and :c:func:`LogL16InitState`. Fixes :oss-fuzz:`2700` Credit to OSS Fuzz * :file:`libtiff/tif_dirwrite.c`: replace assertion related to not finding the ``SubIFD`` tag by runtime check (in :c:func:`TIFFWriteDirectorySec`) Fixes :bugzilla:`2727` Reported by team OWL337 * :file:`libtiff/tif_dirwrite.c`: replace assertion to tag value not fitting on :c:type:`uint32` when selecting the value of ``SubIFD`` tag by runtime check (in :c:func:`TIFFWriteDirectoryTagSubifd`). Fixes :bugzilla:`2728` Reported by team OWL337 * :file:`libtiff/tif_jpeg.c`: accept reading the last strip of a JPEG compressed file if the codestream height is larger than the truncated height of the strip. Emit a warning in this situation since this is non compliant. * :file:`libtiff/tiffiop.h`, :c:type:`tif_aux.c`: redirect :c:func:`SeekOK` macro to a :c:func:`_TIFFSeekoK` function that checks if the offset is not bigger than :c:macro:`INT64_MAX`, so as to avoid a ``-1`` error return code of :c:func:`TIFFSeekFile` to match a required seek to :c:macro:`UINT64_MAX`/``-1``. Fixes :bugzilla:`2726` Adapted from proposal by Nicolas Ruff. * :file:`libtiff/tif_dirread.c`: add :c:macro:`NULL` check to avoid likely false positive null-pointer dereference warning by CLang Static Analyzer. * :file:`libtiff/libtiff.def`: add :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` Fixes :bugzilla:`2735` * :file:`libtiff/tif_jpeg.c`: add compatibility with libjpeg-turbo 1.5.2 that honours ``max_memory_to_use > 0``. Cf ``_. * :file:`libtiff/tif_getimage.c`: avoid floating point division by zero in :c:func:`initCIELabConversion` Fixes :oss-fuzz:`3733` Credit to OSS Fuzz Tools changes ------------- * :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" mode on ``PlanarConfig=Contig`` input images. Fixes :bugzilla:`2715` Reported by team OWL337 * :file:`tools/tiffset.c`: fix setting a single value for the ``ExtraSamples`` tag (and other tags with variable number of values). So ``tiffset -s ExtraSamples 1 X``. This only worked when setting 2 or more values, but not just one. * :file:`tools/fax2tiff.c` (``_FAX_Client_Data``): Pass ``FAX_Client_Data`` as the client data. This client data is not used at all at the moment, but it makes the most sense. Issue that the value of ``client_data.fd`` was passed where a pointer is expected was reported via email by Gerald Schade on Sun, 29 Oct 2017. * :file:`tools/tiff2pdf.c` (``t2p_sample_realize_palette``): Fix possible arithmetic overflow in bounds checking code and eliminate comparison between signed and unsigned type. * :file:`tools/tiff2bw.c` (:c:func:`main`): Free memory allocated in the :program:`tiff2bw` program. This is in response to the report associated with :cve:`2017-16232` but does not solve the extremely high memory usage with the associated POC file. Contributed software changes ---------------------------- None Changes in TIFF v4.1.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.1.0 (:tag:`v4.1.0`) Previous Version :doc:`v4.0.10 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== This document describes the changes made to the software between the *previous* and *current* versions (see above). If you don't find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here. A change summary is also provided by the :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * 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) :c:func:`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 :c:func:`TIFFOpen` (which implies ``D``). The public :c:func:`TIFFGetStrileOffset`, :c:func:`TIFFGetStrileOffsetWithErr`, :c:func:`TIFFGetStrileByteCount` and :c:func:`TIFFGetStrileByteCountWithErr` 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``. Software configuration changes ------------------------------ * The ``WIN32`` build now uses :file:`tif_win32.c` when building with CMake. * Properly set value of :c:macro:`HOST_FILLORDER` to :c:macro:`LSB2MSB` for Windows CMake builds. It was not being properly set! Library changes --------------- * Changes in the libtiff library may be viewed on-line `Libtiff Library Commits `_.. * New function :c:func:`TIFFReadFromUserBuffer` which replaces the use of :c:func:`TIFFReadEncodedStrip`/:c:func:`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 :c:func:`TIFFDeferStrileArrayWriting` and :c:func:`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. Tools changes ------------- * Changes in the libtiff utilities may be viewed on-line at `Libtiff Tools Commits `_. Contributed software changes ---------------------------- * Changes in the libtiff contrib area may be viewed on-line at `Libtiff Contrib Commits `_. Changes in TIFF v4.2.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.2.0 (:tag:`v4.2.0`) Previous Version :doc:`v4.1.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * Optional support for using libdeflate is added. * Many of the tools now support a memory usage limit. Software configuration changes ------------------------------ * The Microsoft Windows 'nmake' build is resuscitated and provides a default ``HAVE_STRTOLL`` setting in 'nmake.opt' which is suitable for MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in order to compile with earlier compiler versions. * mingw-w64 cmake build fixes to not add libm Library changes --------------- * A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. * EXIF 2.32 and GPS tags and functionality have been upgraded: * Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2 * EXIF-GPS structure, tags and access functions are added as special ``CustomDirectory`` (like it was done for EXIF). * Reading error for FileSource and SceneType tags corrected. * Make ``TIFFTAG_CFAPATTERN`` variable count. * Cmake configuration fixes for big-endian targets. * Added support for optional building against libdeflate for faster Zip/Deflate compression/decompression. We now have 2 kinds of builds with the Zip/Deflate codec: * zlib only * zlib + libdeflate Speed improvements in the 35%-50% range can be expected when libdeflate is used. Compression level up to 12 is now supported (capped to 9 when zlib is used). Still requires zlib for situations where libdeflate cannot be used (that is for scanline access, since libdeflate has no streaming mode) Pseudo-tag ``TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE`` is added to control which subcodec (zlib or libdeflate) should be used (it defaults of course to libdeflate, when it is available). This is mostly aimed at being used on the writing side, to be able to reproduce output of previous libtiff versions at a binary level, in situations where this would be really needed. Or as a safety belt in case there would be unforeseen issues with using libdeflate. It can be used to know when libdeflate is available at runtime (``DEFLATE_SUBCODEC_LIBDEFLATE`` will be the default value in that situation). Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa. Tools changes ------------- * A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. * :program:`ppm2tiff`: support any bps value from 1 to 16. * :program:`tiff2ps`, :program:`tiff2rgba`: A default memory limit is now enforced (256MiB) and a ``-M`` option is added to allow the user to adjust the limit. * :program:`tiff2pdf`, :program:`tiffcp`: A default memory limit is now enforced (256MiB) and a ``-m`` option is added to allow the user to adjust the limit. * :program:`tiffcrop`: A default memory limit is now enforced (256MiB) and a ``-k`` option is added to allow the user to adjust the limit. * :program:`tiff2pdf`: fix "raw" copy of Deflate streams. * :program:`tiff2pdf.c`: properly calculate datasize when saving to JPEG YCbCr * :program:`tiffcp`: disable strip chopping when trying to convert to JBIG compression Contributed software changes ---------------------------- None Changes in TIFF v4.3.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.3.0 (:tag:`v4.3.0`) Previous Version :doc:`v4.2.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * Build and usage of the library and its utilities requires a C99 capable compiler. * New optional codec for the LERC (Limited Error Raster Compression) compression scheme. To have it available, configure libtiff against the SDK available at ``_ * CMake build: revamp of build scripts Software configuration changes ------------------------------ * cmake: revamp of the cmake build scripts. There are impacts on the case of some options. * cmake: update minimum version and policy version to 3.9. * Remove NMake build support. The functionality provided by the NMake build is now completely superseded by the CMake build. * Remove antiquated Scons and makefile.lcc build support. * Remove non-functional VMS and WinCE support. * :file:`autogen.sh` now updates :file:`config.guess` and :file:`config.sub` from master gnulib version. Library changes --------------- * Use of :c:type:`int8`, :c:type:`uint8`, :c:type:`int16`, :c:type:`uint16`, :c:type:`int32`, :c:type:`uint32`, :c:type:`int64`, :c:type:`uint64` typedefs is now deprecated. libtiff code and headers no longer use them, and use their C99 standard equivalents (with ``_t`` suffix). Those typedefs are still available, with deprecation warnings, but external code is strongly encouraged to use the corresponding C99 :file:`stdint.h` types. The deprecated types might be removed in a future release. * Removal of unused, or now useless due to C99 availability, functions in :file:`port/` * A few issues spotted by static code analysis tools fixed. Compiler warnings addressed. Tools changes ------------- * In usage text, insert a line of text summarizing each tool's purpose * tiff tools: made display of compression methods and their parameters conditional on their actual availability * :program:`tiff2ps`: exit the loop in case of error (#232) * :program:`tiff2pdf`: check that tiff_datasize fits in a signed :c:type:`tsize_t` (#202) * :program:`tiffsplit`: exit with :c:macro:`EXIT_FAILURE` if there are extra args on the command line * :program:`tiffcmp`: fix comparaison with pixels that are fractional number of bytes (#53) Contributed software changes ---------------------------- * :file:`iptcutil.c` - set ``#ifdef _WIN32`` (was ``#ifdef WIN32``, which failed at build time) Changes in TIFF v4.4.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.4.0 (:tag:`v4.4.0`) Previous Version :doc:`v4.3.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- None Software configuration changes ------------------------------ * Handle absolute paths in pkg-config file (:issue:`333`) * Correct fix for the pkgconf file relative paths. * cmake: allow running the tests with a read-only source directory. * cmake: Fix ``STRIPCHOP_DEFAULT`` value in CMake builds. * build: Fix static library imports in mingw related to LERC * Fix version in :file:`libtiff-4.pc.in`, and CMake build: Add requirements to pc file * cmake: Fix build with CMake 3.10. * cmake: Export tiff targets. * Make ``LERC_SUPPORT`` conditional on ``ZLIB_SUPPORT`` Library changes --------------- New/improved functionalities: * :c:func:`TIFFIsBigTiff` function added. * Functions :c:func:`TIFFFieldSetGetSize` and :c:func:`TIFFieldSetGetCountSize` added. * :c:func:`LZWDecode`: major speed improvements (~30% faster) * Predictor 2 (horizontal differenciation): support 64-bit * Support libjpeg 9d Bug fixes: * Remove incorrect assert (:issue:`329`) * avoid hang in :c:func:`TIFFRewriteDirectory` if a classic file > 4 GB is attempted to be created * :file:`tif_jbig.c`: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes :issue:`385`) * :c:func:`TIFFFetchNormalTag`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`383`) * :c:func:`TIFFWriteDirectoryTagData`: turn assertion on data length into a runtime check * :c:func:`TIFFFetchStripThing`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) * :c:func:`TIFFReadDirectory`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) * :c:func:`TIFFYCbCrToRGBInit`: avoid Integer-overflow * ``TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS)``: return error if returned pointer is NULL (fixes :issue:`342`) * OJPEG: avoid assertion when using :c:func:`TIFFReadScanline` (fixes :issue:`337`) * :c:func:`TIFFReadDirectory`: fix OJPEG hack (fixes :issue:`319`) * LZW codec: fix support for strips/tiles > 2 GB on Windows * :c:func:`TIFFAppendToStrip`: fix rewrite-in-place logic (fixes :issue:`309`) * Fix :c:func:`TIFFRewriteDirectory` discarding directories. * :c:func:`TIFFReadCustomDirectory`: avoid crash when reading SubjectDistance tag on a non EXIF directory (:issue:`316`) * Fix Segmentation fault printing GPS directory if ``Altitude`` tag is present * :file:`tif_jpeg.c`: do not emit progressive scans with mozjpeg. (:issue:`266`) * :c:func:`_TIFFRewriteField`: fix when writing a IFD with a single tile that is a sparse one, on big endian hosts * Fix all remaining uses of legacy Deflate compression id and warn on use. Tools changes ------------- Bug fixes: * :program:`tiffcrop`: Fix issue :issue:`330` and some more from 320 to 349. * :program:`tiffcrop`: fix issue :issue:`395`: generation of strange section images. * :program:`tiffcrop`: fix issue :issue:`380` and :issue:`382` heap buffer overflow in extractImageSection * :program:`tiffcrop`: fix FPE (:issue:`393`) * :program:`tiffcrop`: buffsize check formula in :c:func:`loadImage` amended (fixes :issue:`273`, :issue:`275`) * :program:`tiffcrop.c`: Fix issue :issue:`352` heap-buffer-overflow by correcting :c:type:`uint32_t` underflow. * :program:`tiff2pdf`: handle 8-bit palette colormap. * :program:`tiffcp`: avoid buffer overflow in "mode" string (fixes :issue:`400`) * :program:`tiffcp`: Fix incomprehensible setting of orientation tag (fixes :issue:`29`) * :program:`tiffcp`: do not try to fetch compressor-specific tags when not appropriate (fixes :issue:`396`) * :program:`tiffcp`: fix heap buffer overflow (:issue:`278`) * :program:`tiff2ps`: In :c:func:`limitMalloc` check for negative size (fixes :issue:`284`) * :program:`tiffinfo`: add a ``-M`` switch to define the maximum heap allocation, and default it to 256 MiB (fixes :issue:`287`, :issue:`290`) * :program:`tiffinfo`: limit more memory allocations using ``-M`` switch (fixes :issue:`288`) * :program:`tiffset`: fix global-buffer-overflow for ASCII tags where count is required (fixes :issue:`355`) * :program:`raw2tiff`: check that band number if not zero to avoid floating point exception(fixes :issue:`338`) * :program:`tiffinfo`/:program:`tiffdump`: improve output for GDAL tags. Contributed software changes ---------------------------- None Changes in TIFF v4.5.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.5.0 (:tag:`v4.5.0`) Previous Version :doc:`v4.4.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- * Whole code base reformatting of .c/.h files using new .clang-format format * Documentation changed from static HTML and man pages to Restructured Text (rst). HTML and man pages are now build artifacts. Software configuration changes ------------------------------ * SONAME version bumped to 6 due to changes in symbol versioning. * autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take into its capability of handling both 8-bit JPEG and 12-bit JPEG in a single build. * autoconf/cmake: detect sphinx-build to build HTML and man pages * CMakeLists.txt: fix warning with -Wdev * CMake: correctly set default value of 'lzma' option when liblzma is detected (:issue:`482`) * CMake: Moved linking of CMath::CMath into CMath_LIBRARY check. * Fix CMake build to be compatible with FetchContent. * cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS (:issue:`443`) * cmake: Fixes for Visual Studio 2022. * Adds Requires.private generation so that pkg-config can correctly find the dependencies of libtiff. * Fix dependency on libm on Android * cmake: libtiffxx is static on win32 * Fix build in tif_lzw.c * CMake: Add options for disabling tools, tests, contrib and docs. Library changes --------------- New/improved functionalities: * Addition of an open option concept with the new functions :c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt`, :c:func:`TIFFClientOpenExt`, :c:func:`TIFFOpenOptionsAlloc`, :c:func:`TIFFOpenOptionsFree` * Leveraging above mentioned open option concept, addition of a new capability to limit the size of a single dynamic memory allocation done by the library with :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` * Leveraging above mentioned open option concept, addition of a new capability to specify per-TIFF handle re-entrant error and warning callbacks with :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and :c:func:`TIFFOpenOptionsSetWarningHandlerExtR` * Related to IFD-Loop detection refactoring, the number of IFDs that libtiff can browse through has been extended from 65535 to 1048576. This value is a build-time setting that can be configured with CMake's TIFF_MAX_DIR_COUNT variable or autoconf's --with-max-dir-count option. API/ABI breaks: * tdir_t type updated to uint32_t. This type is now used for the return value of :c:func:`TIFFCurrentDirectory` and :c:func:`TIFFNumberOfDirectories`, and as the argument of :c:func:`TIFFSetDirectory` and :c:func:`TIFFUnlinkDirectory` Bug fixes: * TIFFWriteRawStrip(): restore capabilities to append data in the current strip (:issue:`489`) * _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on broken files (:issue:`479`) * TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB (oss-fuzz #53137) * Replace sprintf calls with snprintf to fix warnings on macOS 13 SDK * Added warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (:issue:`438`) * tif_dirinfo.c: fix TIFFTAG_CLIPPATH tag declaration (:issue:`439`) * tif_dirinfo.c: fix TIFFTAG_COMPRESSION and _BITSPERSAMPLE tag declaration (:issue:`364`) * Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value (:issue:`149`, :issue:`150`, :issue:`152`, :issue:`168`, :issue:`250`, :issue:`269`,:issue:`398`, CVE-2022-3599, :issue:`456`) * TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case (oss-fuzz #52309) * Improved/fixes IFD-Loop Handling (:issue:`455`). * Update getimage to support large raster images. * Presetting of default tag values extended (e.g. PlanarConfig). (:issue:`449`) * Deal with RichTIFFIPTC tag written with LONG type (:issue:`225`) * TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (:issue:`442`) * tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional compile-time version check * TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could cause issues with reading JPEG compressed files * _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific tag and the codec is not configured (:issue:`433`, :issue:`486`, CVE-2022-34526) * Add basic 16 bit cielab support. * WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding * tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2 Tools changes ------------- New/improved functionality: * :program:`tiffinfo`: Updated to parse through SubIFDs and show their tags. Bug fixes: * :program:`tiffcrop`: add check if (bps != 1) in writeSingleSection() (:issue:`169`) * :program:`tiffcrop`: Fix too many 'mode' options on command line (:issue:`470` and :issue:`450`) * :program:`tiffcrop`: Fix memory allocation to require a larger buffer (:issue:`271`, :issue:`381`, :issue:`386`, :issue:`388`, :issue:`389`, :issue:`435`, CVE-2022-3570, CVE-2022-3598) * :program:`tiffcrop`: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (:issue:`411`, CVE-2022-3627, :issue:`413`, CVE-2022-3597, :issue:`426`, CVE-2022-3626) * :program:`tiffcrop`: -S option mutually exclusive (:issue:`349`, :issue:`414`, :issue:`422`, :issue:`423`, :issue:`424`) * :program:`tiffcrop`: fix floating-point exception (:issue:`415`, :issue:`427`, :issue:`428`, CVE-2022-2056, CVE-2022-2057, CVE-2022-2058) * :program:`tiff2pdf`: Don't try to seek into stdout (:issue:`441`) * :program:`tiffinfo`: update curdir from uint16_t to tdir_t for more than 64k IFD handling. Contributed software changes ---------------------------- None Changes in TIFF v4.5.1 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.5.1 (:tag:`v4.5.1`) Previous Version :doc:`v4.5.0 ` 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 :file:`ChangeLog` file included in the release package and by the Git commit history: .. warning:: 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. .. warning:: 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 https://gitlab.com/libtiff/libtiff/-/merge_requests/496 and https://gitlab.com/libtiff/libtiff/-/merge_requests/494 Major changes ------------- None 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 tif_config.h.cmake.in and tiffconf.h.cmake.in 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:`526`). * CMake: FindLERC.cmake: version string return added. * CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files * CMake: fix export of INTERFACE_INCLUDE_DIRECTORIES Library changes --------------- New/improved functionalities: * Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make 'H' flag of :c:func:`TIFFOpen` to warn and an alias of FILLORDER_MSB2LSB. :file:`tif_lerc.c`: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN. * Optimize relative seeking within :c:func:`TIFFSetDirectory` by using the learned list of IFD offsets. * Improve internal IFD offset and directory number map handling. * Behavior of :c:func:`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:`484`). * tif_ojpeg.c: checking for division by zero (fixes :issue:`554`). * LZWDecode(): avoid crash when trying to read again from a strip whith a missing end-of-information marker (fixes :issue:`548`). * Fixed runtime error: applying zero offset to null pointer in :c:func:`countInkNamesString`. * Fixing crash in :c:func:`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 :c:func:`uv_encode` (:issue:`530`). * :c:func:`TIFFClose` avoid NULL pointer dereferencing (:issue:`515`). * 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:`513`). * :c:func:`TIFFSetDirectory` and :c:func:`TIFFWriteDirectorySec` avoid harmless unsigned-integer-overflow (due to gdal oss-fuzz #54311 and #54343). * :file:`tif_ojpeg.c`: fix :issue:`554` 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:`548`). Documentation ------------- * 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: * :program:`tiffcrop`: Consider error return of writeSelections() (fixes :issue:`553`). * :program:`tiffcrop`: fix memory leak (:issue:`475`). * :program:`tiffcrop`: do not reuse input buffer for subsequent images (:issue:`527`). * :program:`tiffcrop`: Amend rotateImage() not to toggle the input (main) image width and length parameters when only cropped image sections are rotated. Remove buffptr from region structure because never used. Fixes :issue:`492`, :issue:`493`, :issue:`494`, :issue:`495`, :issue:`499`, :issue:`518`, :issue:`519`. * :program:`tiffcrop`: correctly update buffersize after rotateImage() (:issue:`520`). * :program:`tiffcrop`: added check for assumption on composite images. Fixes :issue:`496`, :issue:`497`, :issue:`498`, :issue:`500`, :issue:`501`. * :program:`tiffmedian`: avoid zero num_colors (:issue:`477`). * :program:`fax2ps`: fix buffer overflow in qsort function pcompar (:issue:`475`). * :program:`tiffset`: get filesize to allocate only the required memory (:issue:`241`). * :program:`tiffcrop`: fix :issue:`553` by considering error return of writeSelections(). * tif_ovrcache.c: check :c:func:`TIFFSetSubDirectory` return value (CID 1524573). Contributed software changes ---------------------------- None Changes in TIFF v4.6.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.6.0 (:tag:`v4.6.0`) Previous Version :doc:`v4.5.1 ` Master Download Site ``_ Master HTTP Site #1 ``_ Master HTTP Site #2 ``_ ====================== ========================================== 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 :file:`ChangeLog` file included in the release package and by the Git commit history: Major changes ------------- .. warning:: This version removes a big number of utilities that have suffered from lack of maintenance over the years and were the source of various reported security issues. See "Removed functionality" below for the list of removed utilities. Starting with libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, tiffdump, tiffcp and tiffset) was discontinued, due to the lack of contributors able to address reported security issues. tiff2ps and tiff2pdf source code has been moved in a unsupported category, no longer built by default, but are still part of the the source distribution. Other retired utilities are in a archive/ directory, only available in the libtiff git repository. Issues related to unsupported and archived tools will no longer be accepted in the libtiff bug tracker. Software configuration changes ------------------------------ * TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and TIFF_LIBRARIES for compatibility with FindTIFF.cmake as shipped by CMake (fixes :issue:`589`) * Update CMake and autoconf scripts to consistently update LibTIFF version defines and references in various files when version definition in configure.ac has been changed. - Move in tiffvers.h from libtiff source directory to libtiff build directory. - Remove unused version information from tif_config.h - With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h are consistently updated from configure.ac. The version release-date is taken from file RELEASE-DATE. - The files VERSION and RELEASE-DATE are only updated with a special CMake target build: cmake --build . --target tiff_release. - For autotools, version information is updated from configure.ac with ./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE. - ./configure generates tiffvers.h with the cached version information and LIBTIFF_RELEASE_DATE. - "make release" updates tiffvers.h and VERSION file with cached version info and RELEASE-DATE file and tiffves.h with the current date. * CMake: fix build with -Dstrip-chopping=off (fixes :issue:`600`) Library changes --------------- New/improved functionalities: * Fix using ``__attribute__`` libtiff with clang-for-windows API/ABI breaks: * None Bug fixes: * WebP decoder: validate WebP blob width, height, band count against TIFF parameters to avoid use of uninitialized variable, or decoding corrupted content without explicit error (fixes :issue:`581`, :issue:`582`). * WebP codec: turn exact mode when creating lossless files to avoid altering R,G,B values in areas where alpha=0 (https://github.com/OSGeo/gdal/issues/8038) * Fix TransferFunction writing of only two transfer functions. * TIFFReadDirectoryCheckOrder: avoid integer overflow. When it occurs, it should be harmless in practice though (https://gitlab.com/libtiff/libtiff/-/merge_requests/512) Documentation ------------- * TiffField functions documentation updated with return behaviour for not defined tags and determination of write-/read-count size. Tools changes ------------- Removed functionality: * The following tools are no longer compiled and have been moved to archive/tools: - fax2ps - fax2tiff - pal2rgb - ppm2tiff - raw2tiff - rgb2ycbcr - thumbnail - tiff2bw - tiff2rgba - tiffcmp - tiffcrop - tiffdither - tiffgt - tiffmedian * The following tools are no longer compiled by default: tiff2ps and tiff2pdf. They have been moved to tools/unsupported. They can be built by setting ``--enable-tools-unsupported`` for autoconf, or ``-Dtiff-tools-unsupported`` for CMake, but as the name imply, they are no longer supported by upstream. Packagers are suggested *not* to enable those options. * tiffcp: remove -i option (ignore errors), because almost all fuzzer issues were consequential errors from ignored errors because of the "-i" option. New/improved functionality: * None Bug fixes: * tiffset: fix #597: warning: comparison of integer expressions of different signedness. (fixes :issue:`597`) * tiffcp: fix memory corruption (overflow) on hostile images (fixes :issue:`591`) Test changes ------------ * Add missing test_write_read_tags.c and test_transferfunction_write_read.c in tarball (fixes :issue:`585`) and correct "long" issue. * Don't use "long" because can be int32_t or int64_t, depending on compiler and system. Changes to contributed and unsupported tools -------------------------------------------- * raw2tiff: fix integer overflow and bypass of the check (fixes :issue:`592`) Changes in TIFF v4.7.0 ====================== .. table:: References :widths: auto ====================== ========================================== Current Version v4.7.0 (:tag:`v4.7.0`) Previous Version :doc:`v4.6.0 ` Primary Download Site ``_ Home HTTP Site #1 ``_ Home HTTP Site #2 ``_ ====================== ========================================== 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 :file:`ChangeLog` file included in the release package and by the Git commit history. Major changes ------------- This version restores in the default build the availability of the tools that had been dropped in v4.6.0 (cf :ref:`rfc2_restoring_needed_tools`) Software configuration changes ------------------------------ - autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection - autoconf build: fix error when running make clean (fixes :issue:`630`) - autoconf build: back off the minimum required automake version to 1.11 - autoconf.ac: fix detection of windows.h for mingw (fixes :issue:`605`) - libtiff-4.pc: Fix `Requires.private` missing `Lerc`. It provides a `.pc` file starting from version 4 (in autoconf builds, we assume that liblerc is at least version 4) - CMake: Fix TIFF_INCLUDE_DIRS - CMake: MinGW compilers don't need a .def file for shared library - CMake: move libdeflate and Lerc to Requires.private - CMake: enable resource compilation on all Windows. Library changes --------------- New/improved functionalities: - Add ``TIFFOpenOptionsSetMaxCumulatedMemAlloc()``. This function complements ``TIFFOpenOptionsSetMaxSingleMemAlloc()`` to define the maximum cumulated memory allocations in byte, for a given TIFF handle, that libtiff internal memory allocation functions are allowed. API/ABI breaks: * None Bug fixes: - TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged. - TIFFXYZToRGB: avoid integer overflow (fixes :issue:`644`) - uv_decode() and uv_encode(): avoid potential out-of-bounds array index (fixes :issue:`645`) - Fix cases where tif_curdir is set incorrectly. Fix cases where the current directory number (tif_curdir) is set inconsistently or incorrectly, depending on the previous history. - TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) output buffer if failure (fixes :issue:`375`) - OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes :issue:`183`) - ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL - LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values - tif_fax3.c: error out after a number of times end-of-file has been reached (fixes :issue:`583`) - LZW: avoid warning about misaligned address with UBSAN (fixes :issue:`616`) - TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row (fixes :issue:`622`, CVE-2023-52356) - tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - Avoid FPEs (division by zero) in tif_getimage.c. - Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros by checking for denominator not zero before macros are executed. (fixes :issue:`628`) - Add non-zero check before division in TIFFComputeStrip() - Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active - Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` - Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated memory in the tif-structure. - For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is set at the end to avoid deleting the last character. (fixes :issue:`579`) - Check return value of _TIFFCreateAnonField(). (fixes :issue:`624`, CVE-2024-7006) - Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857) - Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes :issue:`618`) - tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes :issue:`608`) Other changes: - Fix warnings with GCC 14 - tif_dir.c: Log source file, line number, and input tif for directory count error (fixes :issue:`627`) - Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() changed to using set_field_type. - tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups - Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble() - Remove support for _MSC_VER < 1500. - Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ Documentation ------------- - Amend manpages for changes in current directory index behaviour - Note on using TIFFFlush() before TIFFClose() to check that the data has been successfully written to the file. (fixes :issue:`506`) - Update TIFF documentation about TIFFOpenOptions.rst and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes (relates to CVE-2024-7006) Tools changes ------------- Re-added tools: - fax2ps - fax2tiff - pal2rgb - ppm2tiff - raw2tiff - rgb2ycbcr (not installed) - thumbnail (not installed) - tiff2bw - tiff2rgba - tiffcmp - tiffcrop - tiffdither - tiffgt - tiffmedian - tiff2ps - tiff2pdf New/improved functionality: - tiff2rgba: Add background gradient option for alpha compositing - tiffcp: -i flag restored Bug fixes: - tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054 - tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection" - tiffcrop: fix buffer overflows, use after free (fixes :issue:`542`, :issue:`550`, :issue:`552`) - tiff2pdf: address Coverity scan issues - tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF - tiff2pdf: fix issue with JPEG restart-interval marker when converting from JPEG-compressed files (fixes :issue:`539`) - tiff2pdf: red and blue were being swapped for RGBA decoding (fixes :issue:`253`) - tiff2pdf: fixes :issue:`596` - thumbnail: address Coverity scan issues - tiffcp: Add check for limitMalloc return to fix Coverity 1603334 - tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG - tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputing to compression != JPEG (refs :issue:`571`) - tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG - tiffcp: Check also codec of input image, not only from output image (fixes :issue:`606`) - Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. - fax2ps and fax2tiff: memory leak fixes (fixes :issue:`476`) - tiffmedian: memory leak fixes (fixes :issue:`599`) - fax2tiff: fix EOFB interpretation (fixes :issue:`191`) - fax2tiff: fix issue with unreasonable width input (fixes :issue:`249`) - tiffcp and tiffcrop: fixes :issue:`228` - tiff2rgba: fixes :issue:`469` - tiffdither: fixes :issue:`473` - tiffdump: fix wrong printf formatter in error message (Coverity 1472932) - tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997) - tifcp/tiffset: use correct format specifiers Changes to contributed and unsupported tools -------------------------------------------- - contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680)