2
0

v4.0.0.html 11 KB

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