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