v3.6.0.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. Changes in TIFF v3.6.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>: v3.6.0<BR>
  17. <B>Previous Version</B>: <A HREF=v3.5.7.html>v3.5.7</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="http://www.simplesystems.org/libtiff/">
  21. http://www.simplesystems.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).
  27. If you don't find something listed here, then it was not done in this
  28. timeframe, or it was not considered important enough to be mentioned.
  29. The following information is located here:
  30. <UL>
  31. <LI><A HREF="#highlights">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. <LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
  37. </UL>
  38. <p>
  39. <P><HR WIDTH=65% ALIGN=left>
  40. <!--------------------------------------------------------------------------->
  41. <A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
  42. <ul>
  43. <li> New utility <a href=./man/raw2tiff.1.html>raw2tiff</a>
  44. for converting raw rasters into TIFF files.
  45. <li> Lots of new <a href=./man/tiff2ps.1.html>tiff2ps</a> options.
  46. <li> Lots of new <a href=./man/fax2tiff.1.html>fax2tiff</a> options.
  47. <li> Lots of bug fixes for LZW, JPEG and OJPEG compression.
  48. </ul>
  49. <h3>Custom Tag Support</h3>
  50. The approach to extending libtiff with custom tags has changed radically.
  51. Previously, all internally supported TIFF tags had a place in the
  52. private TIFFDirectory structure within libtiff to hold the values (if read),
  53. and a "field number" (ie. FIELD_SUBFILETYPE) used to identify that tag.
  54. However, every time a new tag was added to the core, the size of the
  55. TIFFDirectory structure would changing, breaking any dynamically linked
  56. software that used the private data structures.<p>
  57. Also, any tag not recognised
  58. by libtiff would not be read and accessible to applications without some
  59. fairly complicated work on the applications part to pre-register the tags
  60. as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on
  61. libtiff. <p>
  62. Among other things this approach required the extension code
  63. to access the private libtiff structures ... which made the higher level
  64. non-libtiff code be locked into a specific version of libtiff at compile time.
  65. This caused no end of bug reports!<p>
  66. The new approach is for libtiff to read all tags from TIFF files. Those that
  67. aren't recognised as "core tags" (those having an associated FIELD_ value,
  68. and place for storage in the TIFFDirectory structure) are now read into a
  69. dynamic list of extra tags (td_customValues in TIFFDirectory). When a new
  70. tag code is encountered for the first time in a given TIFF file, a new
  71. anonymous tag definition is created for the tag in the tag definition list.
  72. The type, and some other metadata is worked out from the instance encountered.
  73. These fields are known as "custom tags". <p>
  74. Custom tags can be set and fetched normally using TIFFSetField() and
  75. TIFFGetField(), and appear pretty much like normal tags to application code.
  76. However, they have no impact on internal libtiff processing (such as
  77. compression). Some utilities, such as tiffcp will now copy these custom
  78. tags to the new output files. <p>
  79. As well as the internal work with custom tags, new C API entry points
  80. were added so that extension libraries, such as libgeotiff, could
  81. define new tags more easily without accessing internal data structures.
  82. Because tag handling of extension tags is done via the "custom fields"
  83. mechanism as well, the definition provided externally mostly serves to provide
  84. a meaningful name for the tag.
  85. The addition of "custom tags" and the altered approach to extending libtiff
  86. with externally defined tags is the primary reason for the shift to the
  87. 3.6.x version number from 3.5.x.<p>
  88. <P><HR WIDTH=65% ALIGN=left>
  89. <!--------------------------------------------------------------------------->
  90. <A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
  91. <UL>
  92. <li> configure, config.site: Fix for large files (>2GiB) support. New
  93. option in the config.site: LARGEFILE="yes". Should be enough for the large
  94. files I/O.
  95. <li> configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT.
  96. <li> html/Makefile.in: Updated to use groffhtml for generating html pages
  97. from man pages.
  98. <li> configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support
  99. from John H. DuBois III.
  100. <li> libtiff/{Makefile.vc, libtiff.def}: Missed declarations added.
  101. <li> libtiff/Makefile.in, tools/Makefile.in: Shared library will not be
  102. stripped when installing, utility binaries will do be stripped. As per bug 93.
  103. <li> man/Makefile.in: Patch DESTDIR handling as per bug 95.
  104. <li> configure: OpenBSD changes for Sparc64 and DSO version as per bug 96.
  105. <li> config.site/configure: added support for OJPEG=yes option to enable
  106. OJPEG support from config.site.
  107. <li> config.guess, config.sub: Updated from ftp.gnu.org/pub/config.
  108. <li> configure: Modify CheckForBigEndian so it can work in a cross
  109. compiled situation.
  110. <li> configure, libtiff/Makefile.in: Changes for building on MacOS 10.1
  111. as per bug 94.
  112. <li> html/Makefile.in: added missing images per bug 92.
  113. <li> port/Makefile.in: fixed clean target per bug 92.
  114. </UL>
  115. <P><HR WIDTH=65% ALIGN=left>
  116. <!--------------------------------------------------------------------------->
  117. <A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
  118. <UL>
  119. <li> libtiff/tif_getimage.c: New function <A
  120. HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImageOriented()</A>
  121. implemented to retrieve raster array with user-specified origin position.
  122. <li> libtiff/tif_fax3.c: Fix wrong line numbering.
  123. <li> libtiff/tif_dirread.c: Check field counter against number of fields.
  124. <li> Store a list of opened IFD to prevent directory looping.
  125. <li> libtiff/tif_jpeg.c: modified segment_height calculation to always
  126. be a full height tile for tiled images. Also changed error to just
  127. be a warning.
  128. <li> libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till
  129. LZWSetupDecode(). Needed to read LZW files in "r+" mode.
  130. <li> libtiff/tif_dir.c: fixed up the tif_postdecode settings responsible
  131. for byte swapping complex image data.
  132. <li> libtiff/tif_open.c: Removed error if opening a compressed file
  133. in update mode bug (198).
  134. <li> libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is
  135. a pre-existing compressed image. That is, image writing to pre-existing
  136. compressed images is not allowed.
  137. <li> html/man/*.html: Web pages regenerated from man pages.
  138. <li> libtiff/tif_jpeg.c: Hack to ensure that "boolean" is defined properly
  139. on Windows so as to avoid the structure size mismatch error from libjpeg
  140. (bug 188).
  141. <li> libtiff/tiff.h: #ifdef USING_VISUALAGE around previous Visual Age
  142. AIX porting hack as it screwed up gcc. (bug 39)
  143. <li> libtiff/tiff.h: added COMPRESSION_JP2000 (34712) for LEAD tools
  144. custom compression.
  145. <li> libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays
  146. by the TIFFFetchByteArray() function. (bug 52)
  147. <li> libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair()
  148. as per bug 196.
  149. <li> libtiff/tif_lzw.c: Additional consistency checking added in
  150. LZWDecode() and LZWDecodeCompat() fixing bugs 190 and 100.
  151. <li> libtiff/tif_lzw.c: Added check for valid code lengths in LZWDecode()
  152. and LZWDecodeCompat(). Fixes bug 115.
  153. <li> tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the
  154. return code from the underlying pick function as per bug 177.
  155. <li> libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to
  156. fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't
  157. present in the tiff tags as per bug 168.
  158. <li> libtiff/tif_jpeg.c: Fixed problem with setting of nrows in
  159. JPEGDecode() as per bug 129.
  160. <li> libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and
  161. TIFFWriteScanline() now set tif_row explicitly in case the codec has
  162. fooled with the value as per bug 129.
  163. <li> libtiff/tif_ojpeg.c: Major upgrade from Scott. Details in bug 156.
  164. <li> libtiff/tif_open.c: Pointers to custom procedures
  165. in TIFFClientOpen() are checked to be not NULL-pointers.
  166. <li> libtiff/tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat
  167. replaced by warnings. Now libtiff should read corrupted LZW-compressed
  168. files by skipping bad strips as per bug 100.
  169. <li> libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h:
  170. <a href=./man/TIFFWriteDirectory.3t.html>TIFFCheckpointDirectory()</a>
  171. routine added as per bug 124. The
  172. <a href=./man/TIFFWriteDirectory.3t.html>TIFFWriteDirectory</a>
  173. man page discusses this new function as well as the related
  174. <a href=./man/TIFFWriteDirectory.3t.html>TIFFRewriteDirectory()</a>.
  175. <li> libtiff/: tif_codec.c, tif_compress.c, tiffiop.h, tif_getimage.c:
  176. Introduced
  177. additional members tif->tif_decodestatus and tif->tif_encodestatus
  178. for correct handling of unconfigured codecs (we should not try to read
  179. data or to define data size without correct codecs). See bug 119.
  180. <li> tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func as
  181. per bug 111.
  182. <li> libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
  183. tif_dirwrite.c: Dwight Kelly added get/put code for new tag XMLPACKET as
  184. defined in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0
  185. spec INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes:
  186. CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and
  187. INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9).
  188. <li> libtiff/tif_getimage.c: Additional check for supported codecs added in
  189. TIFFRGBAImageOK, TIFFReadRGBAImage, TIFFReadRGBAStrip and TIFFReadRGBATile now
  190. use TIFFRGBAImageOK before reading a per bug 110.
  191. <li> libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
  192. tif_dirwrite.c: Added routine
  193. <a href=./man/TIFFDataWidth.3t.html>TIFFDataWidth</a> for determining
  194. TIFFDataType sizes instead of working with tiffDataWidth array
  195. directly as per bug 109.
  196. <li>libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to
  197. read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION,
  198. TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC as per bug 99.
  199. <li> libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__ as per bug 94.
  200. <li> libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the
  201. decodestrip function returns anything not greater than zero as per bug 97.
  202. <li> libtiff/tif_jpeg.c: fixed computation of segment_width for
  203. tiles files to avoid error about it not matching the
  204. cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile
  205. size.") for ITIFF files. Apparently the problem was incorporated since
  206. 3.5.5, presumably during the OJPEG/JPEG work recently.
  207. <li> libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1
  208. (defined in tiffconf.h - 1 by default) then the RGBA interface
  209. will assume that a fourth extra sample is ASSOCALPHA if the
  210. EXTRASAMPLE value isn't set for it. This changes the behaviour of
  211. the library, but makes it work better with RGBA files produced by
  212. lots of applications that don't mark the alpha values properly.
  213. As per bugs 93 and 65.
  214. <li> libtiff/tif_jpeg.c: allow jpeg data stream sampling values to
  215. override those from tiff directory. This makes this work with
  216. ImageGear generated files.
  217. </UL>
  218. <P><HR WIDTH=65% ALIGN=left>
  219. <!-------------------------------------------------------------------------->
  220. <A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
  221. <UL>
  222. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Added page size setting
  223. when creating PS Level 2.
  224. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Fixed PS comment emitted when
  225. FlateDecode is being used.
  226. <li> <a href=./man/tiffsplit.1.html>tiffsplit</a>: increased the maximum
  227. number of pages that can be split.
  228. <li> <a href=./man/raw2tiff.1.html>raw2tiff</a>: Added option `-p' to
  229. explicitly select color space of input image data.
  230. <li> <a href=./man/tiffmedian.1.html>tiffmedian</a>: Suppiort for large
  231. (> 2GB) images.
  232. <li> <a href=./man/ppm2tiff.1.html>ppm2tiff</a>: Fixed possible endless loop.
  233. <li> <a href=./man/tiff2rgba.1.html>tiff2rgba</a>: Switched to use
  234. <A HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImageOriented()</A>
  235. instead of <A HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImage()</A>.
  236. <li> <a href=./man/tiffcmp.1.html>tiffcmp</a>: Fixed problem with unused data
  237. comparing (bug 349). `-z' option now can be used to set the number of reported
  238. different bytes.
  239. <li> <a href=./man/tiffcp.1.html>tiffcp</a>: Added possibility to specify
  240. value -1 to -r option to get the entire image as one strip (bug 343).
  241. <li> <a href=./man/tiffcp.1.html>tiffcp</a>: Set the correct RowsPerStrip
  242. and PageNumber values (bug 343).
  243. <li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Page numbering fixed (bug
  244. 341).
  245. <li> <a href=./man/ppm2tiff.1.html>ppm2tiff</a>: PPM header parser improved:
  246. now able to skip comments.
  247. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Force deadzone printing when
  248. EPS output specified (bug 325).
  249. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Add ability to generate
  250. PS Level 3. It basically allows one to use the /flateDecode filter for ZIP
  251. compressed TIFF images. Patch supplied by Tom Kacvinsky (bug 328).
  252. <li> <a href=./man/tiffcp.1.html>tiffcp</a>: Fixed problem with colorspace
  253. conversion for JPEG encoded images (bugs 23 and 275)
  254. <li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Applied patch from
  255. Julien Gaulmin. More switches for fax2tiff tool for better control
  256. of input and output (bugs 272 and 293).
  257. <li> <a href=./man/raw2tiff.1.html>raw2tiff</a>:
  258. New utility for turning raw raster images into TIFF files
  259. written by Andrey Kiselev.
  260. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>:
  261. Sebastian Eken provided patches (bug 200) to add new these new
  262. switches:
  263. <ul>
  264. <li> <b>-b #</b>: for a bottom margin of # inches
  265. <li> <b>-c</b>: center image
  266. <li> <b>-l #</b>: for a left margin of # inches
  267. <li> <b>-r</b>: rotate the image by 180 degrees
  268. </ul>
  269. Also, new features merged with code for shrinking/overlapping.
  270. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Don't emit BeginData/EndData
  271. DSC comments since we are unable to properly include the amount to skip
  272. as per bug 80.
  273. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Added workaround for some
  274. software that may crash when last strip of image contains fewer number
  275. of scanlines than specified by the `/Height' variable as per bug 164.
  276. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Patch from John Williams to add new
  277. functionality for tiff2ps utility splitting long images in several pages as
  278. per bug 142. New switches:
  279. <ul>
  280. <li> <b>-H #</b>: split image if height is more than # inches
  281. <li> <b>-L #</b>: overLap split images by # inches
  282. </ul>
  283. <li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: New commandline
  284. switches to override resolution units obtained from the input file per bug 131:
  285. <ul>
  286. <li> <b>-x</b>: override resolution units as centimeters
  287. <li> <b>-y</b>: override resolution units as inches
  288. </ul>
  289. <li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Updated to reflect
  290. latest changes in libtiff per bug 125.
  291. <li> tiff2ps: Division by zero fixed as per bug 88.
  292. <li> <a href=./man/tiffcp.1.html>tiffcp<a>:
  293. Added support for 'Orientation' tag.
  294. <li> <a href=./man/tiffdump.1.html>tiffdump</a>:
  295. include TIFFTAG_JPEGTABLES in tag list.
  296. <li> tiffset: fix bug in error reporting.
  297. </UL>
  298. <P><HR WIDTH=65% ALIGN=left>
  299. <!--------------------------------------------------------------------------->
  300. <A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
  301. <UL>
  302. <li> Fixed distribution to include contrib/addtiffo/tif_ovrcache.{c,h}.
  303. <li> libtiff/contrib/win95: renamed to contrib/win_dib. Added new
  304. Tiffile.cpp example of converting TIFF files into a DIB on Win32 as per
  305. bug 143.
  306. </UL>
  307. <!--------------------------------------------------------------------------->
  308. <A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION
  309. KIT:</B></A>
  310. <UL>
  311. <li> LZW compression kit synchronized with actual libtiff version.
  312. </UL>
  313. <A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
  314. <HR>
  315. Last updated $Date: 2016-09-25 20:05:45 $.
  316. </BODY>
  317. </HTML>