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