<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Changes in TIFF v4.7.0 &#8212; LibTIFF 4.7.1 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b849a4e9" />
    <link rel="stylesheet" type="text/css" href="../_static/sphinxdoc.css?v=0a676766" />
    <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3b5d5a7b"></script>
    <script src="../_static/doctools.js?v=888ff710"></script>
    <script src="../_static/sphinx_highlight.js?v=4825356b"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Changes in TIFF v4.6.0" href="v4.6.0.html" />
    <link rel="prev" title="Changes in TIFF v4.7.1" href="v4.7.1.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="v4.6.0.html" title="Changes in TIFF v4.6.0"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="v4.7.1.html" title="Changes in TIFF v4.7.1"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">LibTIFF 4.7.1 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Release history</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Changes in TIFF v4.7.0</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="changes-in-tiff-v4-7-0">
<h1>Changes in TIFF v4.7.0<a class="headerlink" href="#changes-in-tiff-v4-7-0" title="Permalink to this heading">¶</a></h1>
<table class="docutils align-default" id="id1">
<caption><span class="caption-text">References</span><a class="headerlink" href="#id1" title="Permalink to this table">¶</a></caption>
<tbody>
<tr class="row-odd"><td><p>Current Version</p></td>
<td><p>v4.7.0 (<a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/tags/v4.7.0">tag v4.7.0</a>)</p></td>
</tr>
<tr class="row-even"><td><p>Previous Version</p></td>
<td><p><a class="reference internal" href="v4.6.0.html"><span class="doc">v4.6.0</span></a></p></td>
</tr>
<tr class="row-odd"><td><p>Primary Download Site</p></td>
<td><p><a class="reference external" href="https://download.osgeo.org/libtiff/">https://download.osgeo.org/libtiff/</a></p></td>
</tr>
<tr class="row-even"><td><p>Home HTTP Site #1</p></td>
<td><p><a class="reference external" href="http://www.simplesystems.org/libtiff/">http://www.simplesystems.org/libtiff/</a></p></td>
</tr>
<tr class="row-odd"><td><p>Home HTTP Site #2</p></td>
<td><p><a class="reference external" href="https://libtiff.gitlab.io/libtiff/">https://libtiff.gitlab.io/libtiff/</a></p></td>
</tr>
</tbody>
</table>
<p>This document provides a summary of significant changes made to the
software between the <em>previous</em> and <em>current</em> versions (see
above). A fully-detailed change summary is provided by the <code class="file docutils literal notranslate"><span class="pre">ChangeLog</span></code> file
included in the release package and by the Git commit history.</p>
<section id="major-changes">
<h2>Major changes<a class="headerlink" href="#major-changes" title="Permalink to this heading">¶</a></h2>
<p>This version restores in the default build the availability of the tools that
had been dropped in v4.6.0 (cf <a class="reference internal" href="../rfcs/rfc2_restoring_needed_tools.html#rfc2-restoring-needed-tools"><span class="std std-ref">RFC 2: Restoring Needed LibTIFF Tools</span></a>)</p>
</section>
<section id="software-configuration-changes">
<h2>Software configuration changes<a class="headerlink" href="#software-configuration-changes" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p>autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection</p></li>
<li><p>autoconf build: fix error when running make clean (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/630">issue #630</a>)</p></li>
<li><p>autoconf build: back off the minimum required automake version to 1.11</p></li>
<li><p>autoconf.ac: fix detection of windows.h for mingw (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/605">issue #605</a>)</p></li>
<li><p>libtiff-4.pc: Fix <cite>Requires.private</cite> missing <cite>Lerc</cite>. It provides a <cite>.pc</cite> file starting from version 4
(in autoconf builds, we assume that liblerc is at least version 4)</p></li>
<li><p>CMake: Fix TIFF_INCLUDE_DIRS</p></li>
<li><p>CMake: MinGW compilers don't need a .def file for shared library</p></li>
<li><p>CMake: move libdeflate and Lerc to Requires.private</p></li>
<li><p>CMake: enable resource compilation on all Windows.</p></li>
</ul>
</section>
<section id="library-changes">
<h2>Library changes<a class="headerlink" href="#library-changes" title="Permalink to this heading">¶</a></h2>
<p>New/improved functionalities:</p>
<ul class="simple">
<li><p>Add <code class="docutils literal notranslate"><span class="pre">TIFFOpenOptionsSetMaxCumulatedMemAlloc()</span></code>. This function complements
<code class="docutils literal notranslate"><span class="pre">TIFFOpenOptionsSetMaxSingleMemAlloc()</span></code> to define the maximum cumulated
memory allocations in byte, for a given TIFF handle, that libtiff internal
memory allocation functions are allowed.</p></li>
</ul>
<p>API/ABI breaks:</p>
<ul class="simple">
<li><p>None</p></li>
</ul>
<p>Bug fixes:</p>
<ul class="simple">
<li><p>TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged.</p></li>
<li><p>TIFFXYZToRGB: avoid integer overflow (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/644">issue #644</a>)</p></li>
<li><p>uv_decode() and uv_encode(): avoid potential out-of-bounds array index
(fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/645">issue #645</a>)</p></li>
<li><p>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.</p></li>
<li><p>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 <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/375">issue #375</a>)</p></li>
<li><p>OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/183">issue #183</a>)</p></li>
<li><p>ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL</p></li>
<li><p>LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values</p></li>
<li><p>tif_fax3.c: error out after a number of times end-of-file has been reached
(fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/583">issue #583</a>)</p></li>
<li><p>LZW: avoid warning about misaligned address with UBSAN (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/616">issue #616</a>)</p></li>
<li><p>TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row
(fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/622">issue #622</a>, CVE-2023-52356)</p></li>
<li><p>tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests</p></li>
<li><p>Avoid FPEs (division by zero) in tif_getimage.c.</p></li>
<li><p>Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros
by checking for denominator not zero before macros are executed. (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/628">issue #628</a>)</p></li>
<li><p>Add non-zero check before division in TIFFComputeStrip()</p></li>
<li><p>Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active</p></li>
<li><p>Setting the TIFFFieldInfo field <cite>set_field_type</cite> should consider <cite>field_writecount</cite> not <cite>field_readcount</cite></p></li>
<li><p>Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated
memory in the tif-structure.</p></li>
<li><p>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 <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/579">issue #579</a>)</p></li>
<li><p>Check return value of _TIFFCreateAnonField(). (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/624">issue #624</a>, CVE-2024-7006)</p></li>
<li><p>Prevent some out-of-memory attacks (<a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857">https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857</a>)</p></li>
<li><p>Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/618">issue #618</a>)</p></li>
<li><p>tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/608">issue #608</a>)</p></li>
</ul>
<p>Other changes:</p>
<ul class="simple">
<li><p>Fix warnings with GCC 14</p></li>
<li><p>tif_dir.c: Log source file, line number, and input tif for directory count error (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/627">issue #627</a>)</p></li>
<li><p>Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec()
changed to using set_field_type.</p></li>
<li><p>tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups</p></li>
<li><p>Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble()</p></li>
<li><p>Remove support for _MSC_VER &lt; 1500.</p></li>
<li><p>Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__</p></li>
</ul>
</section>
<section id="documentation">
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p>Amend manpages for changes in current directory index behaviour</p></li>
<li><p>Note on using TIFFFlush() before TIFFClose() to check that the data has been
successfully written to the file. (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/506">issue #506</a>)</p></li>
<li><p>Update TIFF documentation about TIFFOpenOptions.rst and
TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes
(relates to CVE-2024-7006)</p></li>
</ul>
</section>
<section id="tools-changes">
<h2>Tools changes<a class="headerlink" href="#tools-changes" title="Permalink to this heading">¶</a></h2>
<p>Re-added tools:</p>
<blockquote>
<div><ul class="simple">
<li><p>fax2ps</p></li>
<li><p>fax2tiff</p></li>
<li><p>pal2rgb</p></li>
<li><p>ppm2tiff</p></li>
<li><p>raw2tiff</p></li>
<li><p>rgb2ycbcr (not installed)</p></li>
<li><p>thumbnail (not installed)</p></li>
<li><p>tiff2bw</p></li>
<li><p>tiff2rgba</p></li>
<li><p>tiffcmp</p></li>
<li><p>tiffcrop</p></li>
<li><p>tiffdither</p></li>
<li><p>tiffgt</p></li>
<li><p>tiffmedian</p></li>
<li><p>tiff2ps</p></li>
<li><p>tiff2pdf</p></li>
</ul>
</div></blockquote>
<p>New/improved functionality:</p>
<ul class="simple">
<li><p>tiff2rgba: Add background gradient option for alpha compositing</p></li>
<li><p>tiffcp: -i flag restored</p></li>
</ul>
<p>Bug fixes:</p>
<ul class="simple">
<li><p>tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054</p></li>
<li><p>tiffcrop: Apply &quot;Fix heap-buffer-overflow in function extractImageSection&quot;</p></li>
<li><p>tiffcrop: fix buffer overflows, use after free (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/542">issue #542</a>,
<a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/550">issue #550</a>, <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/552">issue #552</a>)</p></li>
<li><p>tiff2pdf: address Coverity scan issues</p></li>
<li><p>tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF</p></li>
<li><p>tiff2pdf: fix issue with JPEG restart-interval marker when converting from
JPEG-compressed files (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/539">issue #539</a>)</p></li>
<li><p>tiff2pdf: red and blue were being swapped for RGBA decoding (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/253">issue #253</a>)</p></li>
<li><p>tiff2pdf: fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/596">issue #596</a></p></li>
<li><p>thumbnail: address Coverity scan issues</p></li>
<li><p>tiffcp: Add check for limitMalloc return to fix Coverity 1603334</p></li>
<li><p>tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -&gt; YCbCr JPEG</p></li>
<li><p>tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/571">issue #571</a>)</p></li>
<li><p>tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING,
REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG</p></li>
<li><p>tiffcp: Check also codec of input image, not only from output image (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/606">issue #606</a>)</p></li>
<li><p>Add some basic sanity checks for tiffcp and tiffcrop RGB-&gt;YCbCr JPEG conversions.</p></li>
<li><p>fax2ps and fax2tiff: memory leak fixes (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/476">issue #476</a>)</p></li>
<li><p>tiffmedian: memory leak fixes (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/599">issue #599</a>)</p></li>
<li><p>fax2tiff: fix EOFB interpretation (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/191">issue #191</a>)</p></li>
<li><p>fax2tiff: fix issue with unreasonable width input (fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/249">issue #249</a>)</p></li>
<li><p>tiffcp and tiffcrop: fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/228">issue #228</a></p></li>
<li><p>tiff2rgba: fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/469">issue #469</a></p></li>
<li><p>tiffdither: fixes <a class="reference external" href="https://gitlab.com/libtiff/libtiff/-/issues/473">issue #473</a></p></li>
<li><p>tiffdump: fix wrong printf formatter in error message (Coverity 1472932)</p></li>
<li><p>tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997)</p></li>
<li><p>tifcp/tiffset: use correct format specifiers</p></li>
</ul>
</section>
<section id="changes-to-contributed-and-unsupported-tools">
<h2>Changes to contributed and unsupported tools<a class="headerlink" href="#changes-to-contributed-and-unsupported-tools" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p>contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680)</p></li>
</ul>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3><a href="../index.html">Table of Contents</a></h3>
    <ul>
<li><a class="reference internal" href="#">Changes in TIFF v4.7.0</a><ul>
<li><a class="reference internal" href="#major-changes">Major changes</a></li>
<li><a class="reference internal" href="#software-configuration-changes">Software configuration changes</a></li>
<li><a class="reference internal" href="#library-changes">Library changes</a></li>
<li><a class="reference internal" href="#documentation">Documentation</a></li>
<li><a class="reference internal" href="#tools-changes">Tools changes</a></li>
<li><a class="reference internal" href="#changes-to-contributed-and-unsupported-tools">Changes to contributed and unsupported tools</a></li>
</ul>
</li>
</ul>

  </div>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="v4.7.1.html"
                          title="previous chapter">Changes in TIFF v4.7.1</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="v4.6.0.html"
                          title="next chapter">Changes in TIFF v4.6.0</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/releases/v4.7.0.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="v4.6.0.html" title="Changes in TIFF v4.6.0"
             >next</a> |</li>
        <li class="right" >
          <a href="v4.7.1.html" title="Changes in TIFF v4.7.1"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">LibTIFF 4.7.1 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >Release history</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Changes in TIFF v4.7.0</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
    &#169; Copyright 1988-2025, LibTIFF contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.1.2.
    </div>
  </body>
</html>