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