v4.0.0.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. Changes in TIFF v4.0.0
  6. </TITLE>
  7. </HEAD>
  8. <BODY BGCOLOR=white>
  9. <FONT FACE="Helvetica, Arial, Sans">
  10. <FONT FACE="Helvetica, Arial, Sans">
  11. <BASEFONT SIZE=4>
  12. <B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
  13. <BASEFONT SIZE=3>
  14. <UL>
  15. <HR SIZE=4 WIDTH=65% ALIGN=left>
  16. <B>Current Version</B>: v4.0.0<BR>
  17. <B>Previous Version</B>: <A HREF=v3.9.5.html>v3.9.5</a><BR>
  18. <B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff">
  19. download.osgeo.org</a>, directory pub/libtiff</A><BR>
  20. <B>Master HTTP Site</B>: <A HREF="https://download.osgeo.org/libtiff">
  21. https://download.osgeo.org/libtiff</a>
  22. <HR SIZE=4 WIDTH=65% ALIGN=left>
  23. </UL>
  24. <P>
  25. This document describes the changes made to the software between the
  26. <I>previous</I> and <I>current</I> versions (see above). If you don't
  27. find something listed here, then it was not done in this timeframe, or
  28. it was not considered important enough to be mentioned. Please consult
  29. the ChangeLog file in the source package for full change details. The
  30. following information is located here:
  31. <UL>
  32. <LI><A HREF="#highlights">Major Changes</A>
  33. <LI><A HREF="#configure">Changes in the software configuration</A>
  34. <LI><A HREF="#libtiff">Changes in libtiff</A>
  35. <LI><A HREF="#tools">Changes in the tools</A>
  36. <LI><A HREF="#contrib">Changes in the contrib area</A>
  37. </UL>
  38. <p>
  39. <P><HR WIDTH=65% ALIGN=left>
  40. <!--------------------------------------------------------------------------->
  41. <P><A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A></P>
  42. BigTIFF support changes:
  43. <UL>
  44. <LI>The options parameter in the TIFFOpen and TIFFClientOpen funcs has
  45. been extended. When creating new files, you can add option '4' to
  46. specify you want to create a ClassicTIFF file, though that is the
  47. default and the option is not strictly necessary. (As such, old
  48. calling code will continue to function and create ClassicTIFF files.)
  49. Or you can add option '8' to specify you want to create a BigTIFF file
  50. instead. This new option is also reflected in some of the tools we
  51. already upgraded. For instance, you can use the -8 option on tiffcp to
  52. have tiffcp produce BigTIFF files instead of the default ClassicTIFF.
  53. (Whilst on additional option is provided for version selection when
  54. creating new files, no such option is necessary when reading TIFF
  55. files. LibTiff reads ClassicTIFF and BigTIFF both, and the application
  56. does not need to be aware which TIFF version an opened file is.)
  57. <LI>Although the tag count in BigTIFF is 64bit, we restricted the
  58. count in the implementation to a much more reasonable size. This is
  59. necessary in current implementation, because all tag data gets read
  60. automatically in the IFD reading stage, so if there's half a dozen
  61. private tags with multiple gigabytes of data that causes considerable
  62. overhead even if the application level is never interested in these
  63. tags. Our choice to ignore tags with data longer then a certain sanity
  64. value is much needed as things stand. We also recommend to step away
  65. from writing tiles that are 8 kilobyte in their uncompressed form, or
  66. writing single-line strips, in really big files, resulting in mega's
  67. of tiles or strips. It's much more efficient to choose bigger tile or
  68. strip sizes, up to several megabyte if needed, and have a few kilo of
  69. tiles or strips instead.
  70. <LI>Although it's rare, some application code does directly access
  71. file offsets. Some of these are automatically upgraded because they
  72. used the toff_t type, others need to be aware that the datatype
  73. changed and need to start using toff_t or uint64. This impacts access
  74. to tags like the EXIF IFD tag, for example, or the SubIfds tag, or to
  75. StripOffsets or TileOffsets, the return type of functions like
  76. TIFFCurrentDirOffset, and a parameter type to functions like
  77. TIFFSetSubDirectory.
  78. <LI>Although it's rare, some application code does use structures
  79. like TIFFHeader or TIFFDirEntry that used to be an exact binary
  80. representation of TIFF structures. These need to change. The old
  81. TIFFHeader structure is replaced by the new TIFFHeaderClassic,
  82. TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact
  83. binary representation of the ClassicTIFF and BigTIFF header, and of
  84. the part that is common to both. There is no new equivalent for the
  85. old TIFFDirEntry structure (or more precisely, there is still a
  86. TIFFDirEntry structure, but it is changed, moved to library-private
  87. definition, and no longer an exact binary representation of the tag
  88. structure of either TIFF version).
  89. <LI>Sizer functions, like TIFFTileSize or TIFFScanlineSize and the
  90. like, return a tmsize_t value (tmsize_t is defined as int32 on 32bit
  91. machines, and int64 on 64bit machines, and as such it is meant to
  92. represent signed memory sizes). This is because we figure 98% of the
  93. calling code uses the return value as sizes in allocations and the
  94. like. So, any overflow that is theoretically possible with BigTIFF
  95. when LibTiff is running on a 32bit system, is best detected inside the
  96. sizer functions and it is best to return a type that makes sense as a
  97. memory size. If your calling code is the exception and is interested
  98. in actual file size, you best use the newer TIFFTileSize64 or
  99. TIFFScanlineSize64 function that returns an uint64 type.
  100. <LI>These TIFF tags require a 64-bit type as an argument in
  101. libtiff 4.0.0:
  102. <UL>
  103. <LI> TIFFTAG_FREEBYTECOUNTS
  104. <LI> TIFFTAG_FREEOFFSETS
  105. <LI> TIFFTAG_STRIPBYTECOUNTS
  106. <LI> TIFFTAG_STRIPOFFSETS
  107. <LI> TIFFTAG_TILEBYTECOUNTS
  108. <LI> TIFFTAG_TILEOFFSETS
  109. </UL>
  110. </UL>
  111. Other important backward incompatible changes in the public API:
  112. <UL>
  113. <LI> TIFFRewriteField() renamed into _TIFFRewriteField() and moved out
  114. from the public interface (from tiffio.h to tiffiop.h). Type of its
  115. 'count' parameter changed from uint32 to tmsize_t.
  116. <LI> TIFFMergeFieldInfo() returns non-void result now. It returns 0
  117. if successful and -1 if failed. Though this is now obsoleted function
  118. and should not be used in new programs. Use the new tag extension
  119. scheme instead.
  120. <LI> TIFFFieldWithTag() and TIFFFieldWithName() functions now return
  121. pointer to TIFFField constant object instead of TIFFFieldInfo.
  122. <LI> TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration
  123. have been removed. They was unused and never been used properly.
  124. Should be unneeded for high-level applications.
  125. <LI> TIFFTagValue structure removed from the public tiffio.h
  126. to private tif_dir.h and not accessible anymore. It should be unneeded
  127. for high-level applications.
  128. </UL>
  129. <P><HR WIDTH=65% ALIGN=left>
  130. <!--------------------------------------------------------------------------->
  131. <P><A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A></P>
  132. <UL>
  133. <LI>Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool
  134. 2.4.
  135. <LI>Enabled support for Automake silent build rules
  136. (--enable-silent-rules or 'make V=0')
  137. <LI>Enabled support for Automake colorized and parallel tests.
  138. <LI>Added detection of 64-bit integer types since libtiff 4.0
  139. requires use of 64-bit signed and unsigned integer types.
  140. <LI>Libtiff now provides a more comprehensive test suite with
  141. over 72 tests, which may be executed on Unix-like systems, or
  142. under Microsoft Windows using MinGW/MSYS or Cygwin.
  143. <LI>--disable-lzma configure option to disable use of liblzma.
  144. <LI>--enable-defer-strile-load configure option to enable
  145. experimental deferred strip/tile offset/size loading. May
  146. cause some extremely sophisticated uses of libtiff to fail.
  147. <LI>--enable-chunky-strip-read configure option to enable
  148. experimental enable reading large strips in chunks in
  149. TIFFReadScanline().
  150. <LI>Now always uses WIN32 native I/O functions for Microsoft
  151. Windows except for under Cygwin.
  152. <LI>Now provides a pkg-config support file (libtiff-4.pc).
  153. </UL>
  154. <P><HR WIDTH=65% ALIGN=left>
  155. <!--------------------------------------------------------------------------->
  156. <P><A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A></P>
  157. <UL>
  158. <LI>Patches/fixes made to stable libtiff (v3.9.X) are also
  159. applied to 4.0.0. There are too many to list here. See the
  160. distribution ChangeLog for a detailed change list.
  161. <LI>There is considerable change in some files like
  162. tif_dirread and tif_dirwrite. These changes don't impact
  163. backwards compatibility, they are mostly a clean rewrite that
  164. does allow BigTIFF support as well as somewhat more robust
  165. reading of the unexpected already and will also serve future
  166. API extension but does not impact current API or functionality
  167. in a negative way that you need to know about.
  168. <LI>Although there is still a functional definition for types
  169. like toff_t (file offset), tstrip_t (strip index number), etc,
  170. we recommend against using these in newer code. We have
  171. learned that it is next to impossible to use these
  172. consistently and make real abstraction of the binary format of
  173. these types. Instead, at a certain level we always end up
  174. doing casts anyway, and taking the exact binary format into
  175. account, so these types are nothing but dangerously misleading
  176. and obfuscating. You do not need to update calling code that
  177. uses them, as 99.9% of such code will continue to work. But we
  178. recommend against using them in newer calling code, and we
  179. started replacing them with binary clear types like uint16,
  180. uint32 and such in the library.
  181. <LI>We do use and will continue to use one functional type
  182. that is an exception to the above rule, being tmsize_t. This
  183. is a signed memory size type, i.e. it is int32 on 32bit
  184. machines, or int64 on 64bit machines.
  185. <LI>Optionally support LZMA compression via TIFF tag 34925.
  186. Tiffcp supports compression levels similar to "-c lzma:p1" or
  187. "-c zip:p9 for setting the LZMA compression parameters.
  188. <LI>Optionally defer the load of strip/tile offset and size
  189. tags for optimized scanning of directories. Enabled with the
  190. --enable-defer-strile-load configure option (DEFER_STRILE_LOAD
  191. #define in tif_config.h).
  192. <LI>Optionally enable experimental support for reading big
  193. strips in chunks. Enabled with the --enable-chunky-strip-read
  194. configure option.
  195. </UL>
  196. <P><HR WIDTH=65% ALIGN=left>
  197. <!-------------------------------------------------------------------------->
  198. <P><A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A></P>
  199. <UL>
  200. <LI>tiffset: add -d and -sd switches to allow operation on
  201. a particular directory, not just the first.
  202. </UL>
  203. <P><HR WIDTH=65% ALIGN=left>
  204. <!--------------------------------------------------------------------------->
  205. <P><A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A></P>
  206. <UL>
  207. </UL>
  208. Last updated $Date: 2016-09-25 20:05:47 $.
  209. </BODY>
  210. </HTML>