summaryrefslogtreecommitdiff
path: root/tiff/html/v3.6.0.html
blob: 888e5472e7cda52cca3b5da08ff0cc570599c4ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
<HTML>
<HEAD>
<TITLE>
Changes in TIFF v3.6.0
</TITLE>
</HEAD>

<BODY BGCOLOR=white>
<FONT FACE="Helvetica, Arial, Sans">
<FONT FACE="Helvetica, Arial, Sans"> 

<BASEFONT SIZE=4>
<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
<BASEFONT SIZE=3>

<UL>
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.6.0<BR>
<B>Previous Version</B>: <A HREF=v3.5.7.html>v3.5.7</a><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
http://www.remotesensing.org/libtiff</a> 
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>

<P>
This document describes the changes made to the software between the
<I>previous</I> and <I>current</I> versions (see above).
If you don't find something listed here, then it was not done in this
timeframe, or it was not considered important enough to be mentioned.
The following information is located here:
<UL>
<LI><A HREF="#hightlights">Major Changes</A>
<LI><A HREF="#configure">Changes in the software configuration</A>
<LI><A HREF="#libtiff">Changes in libtiff</A>
<LI><A HREF="#tools">Changes in the tools</A>
<LI><A HREF="#contrib">Changes in the contrib area</A>
<LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
</UL>
<p> 
<P><HR WIDTH=65% ALIGN=left>

<!--------------------------------------------------------------------------->

<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>

<ul>
	<li> New utility <a href=./man/raw2tiff.1.html>raw2tiff</a>
for converting raw rasters into TIFF files.
	<li> Lots of new <a href=./man/tiff2ps.1.html>tiff2ps</a> options.
	<li> Lots of new <a href=./man/fax2tiff.1.html>fax2tiff</a> options.
	<li> Lots of bug fixes for LZW, JPEG and OJPEG compression. 
</ul>

<h3>Custom Tag Support</h3>

The approach to extending libtiff with custom tags has changed radically.
Previously, all internally supported TIFF tags had a place in the 
private TIFFDirectory structure within libtiff to hold the values (if read),
and a "field number" (ie. FIELD_SUBFILETYPE) used to identify that tag. 
However, every time a new tag was added to the core, the size of the
TIFFDirectory structure would changing, breaking any dynamically linked
software that used the private data structures.<p>

Also, any tag not recognised
by libtiff would not be read and accessable to applications without some
fairly complicated work on the applications part to pre-register the tags
as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on
libtiff.  <p>

Amoung other things this approach required the extension code
to access the private libtiff structures ... which made the higher level
non-libtiff code be locked into a specific version of libtiff at compile time.
This caused no end of bug reports!<p>

The new approach is for libtiff to read all tags from TIFF files.  Those that
aren't recognised as "core tags" (those having an associated FIELD_ value, 
and place for storage in the TIFFDirectory structure) are now read into a 
dynamic list of extra tags (td_customValues in TIFFDirectory).  When a new
tag code is encountered for the first time in a given TIFF file, a new 
anonymous tag definition is created for the tag in the tag definition list. 
The type, and some other metadata is worked out from the instance encountered.
These fields are known as "custom tags".  <p>

Custom tags can be set and fetched normally using TIFFSetField() and 
TIFFGetField(), and appear pretty much like normal tags to application code.
However, they have no impact on internal libtiff processing (such as
compression).  Some utilities, such as tiffcp will now copy these custom
tags to the new output files. <p>

As well as the internal work with custom tags, new C API entry points
were added so that extension libraries, such as libgeotiff, could 
define new tags more easily without accessing internal data structures.  
Because tag handling of extension tags is done via the "custom fields" 
mechanism as well, the definition provided externally mostly serves to provide
a meaningful name for the tag.

The addition of "custom tags" and the altered approach to extending libtiff
with externally defined tags is the primary reason for the shift to the 
3.6.x version number from 3.5.x.<p>

<P><HR WIDTH=65% ALIGN=left>
<!--------------------------------------------------------------------------->

<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>

<UL>
<li> configure, config.site: Fix for large files (>2GiB) support. New
option in the config.site: LARGEFILE="yes". Should be enougth for the large
files I/O.

<li> configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT.

<li> html/Makefile.in: Updated to use groffhtml for generating html pages
from man pages.

<li> configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support
from John H. DuBois III.  

<li> libtiff/{Makefile.vc, libtiff.def}: Missed declarations added.

<li> libtiff/Makefile.in, tools/Makefile.in: Shared library will not be
stripped when installing, utility binaries will do be stripped. As per bug 93.

<li> man/Makefile.in: Patch DESTDIR handling as per bug 95.

<li> configure: OpenBSD changes for Sparc64 and DSO version as per bug 96.

<li> config.site/configure: added support for OJPEG=yes option to enable
OJPEG support from config.site.

<li> config.guess, config.sub: Updated from ftp.gnu.org/pub/config.

<li> configure: Modify CheckForBigEndian so it can work in a cross
compiled situation.

<li> configure, libtiff/Makefile.in: Changes for building on MacOS 10.1
as per bug 94.

<li> html/Makefile.in: added missing images per bug 92.

<li> port/Makefile.in: fixed clean target per bug 92.
</UL>

<P><HR WIDTH=65% ALIGN=left>

<!--------------------------------------------------------------------------->

<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>

<UL>

<li> libtiff/tif_getimage.c: New function <A
HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImageOriented()</A>
implemented to retrieve raster array with user-specified origin position.

<li> libtiff/tif_fax3.c: Fix wrong line numbering.

<li> libtiff/tif_dirread.c: Check field counter against number of fields.

<li> Store a list of opened IFD to prevent directory looping.

<li> libtiff/tif_jpeg.c: modified segment_height calculation to always
be a full height tile for tiled images.  Also changed error to just
be a warning.

<li> libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till
LZWSetupDecode().  Needed to read LZW files in "r+" mode.
	
<li> libtiff/tif_dir.c: fixed up the tif_postdecode settings responsible
for byte swapping complex image data.
	
<li> libtiff/tif_open.c: Removed error if opening a compressed file
in update mode bug (198).

<li> libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is
a pre-existing compressed image.  That is, image writing to pre-existing
compressed images is not allowed.

<li> html/man/*.html: Web pages regenerated from man pages.

<li> libtiff/tif_jpeg.c: Hack to ensure that "boolean" is defined properly
on Windows so as to avoid the structure size mismatch error from libjpeg
(bug 188).

<li> libtiff/tiff.h: #ifdef USING_VISUALAGE around previous Visual Age
AIX porting hack as it screwed up gcc. (bug 39)

<li> libtiff/tiff.h: added COMPRESSION_JP2000 (34712) for LEAD tools
custom compression.

<li> libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays
by the TIFFFetchByteArray() function. (bug 52)

<li> libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair()
as per bug 196.

<li> libtiff/tif_lzw.c: Additional consistency checking added in
LZWDecode() and LZWDecodeCompat() fixing bugs 190 and 100.

<li> libtiff/tif_lzw.c: Added check for valid code lengths in LZWDecode()
and LZWDecodeCompat(). Fixes bug 115.

<li> tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the
return code from the underlying pick function as per bug 177.

<li> libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to
fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't
present in the tiff tags as per bug 168.

<li> libtiff/tif_jpeg.c: Fixed problem with setting of nrows in 
JPEGDecode() as per bug 129. 

<li> libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and
TIFFWriteScanline() now set tif_row explicitly in case the codec has
fooled with the value as per bug 129.

<li> libtiff/tif_ojpeg.c: Major upgrade from Scott.  Details in bug 156.

<li>  libtiff/tif_open.c: Pointers to custom procedures
in TIFFClientOpen() are checked to be not NULL-pointers.

<li> libtiff/tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat
replaced by warnings. Now libtiff should read corrupted LZW-compressed
files by skipping bad strips as per bug 100.
	
<li> libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h:
<a href=./man/TIFFWriteDirectory.3t.html>TIFFCheckpointDirectory()</a>
routine added as per bug 124.  The
<a href=./man/TIFFWriteDirectory.3t.html>TIFFWriteDirectory</a>
man page discusses this new function as well as the related 
<a href=./man/TIFFWriteDirectory.3t.html>TIFFRewriteDirectory()</a>.

<li> libtiff/: tif_codec.c, tif_compress.c, tiffiop.h, tif_getimage.c: 
Introduced
additional members tif->tif_decodestatus and tif->tif_encodestatus
for correct handling of unconfigured codecs (we should not try to read
data or to define data size without correct codecs). See bug 119.

<li> tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func as
per bug 111.

<li> libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
tif_dirwrite.c: Dwight Kelly added get/put code for new tag XMLPACKET as 
defined in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 
spec INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes: 
CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and
INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9).

<li> libtiff/tif_getimage.c: Additional check for supported codecs added in 
TIFFRGBAImageOK, TIFFReadRGBAImage, TIFFReadRGBAStrip and TIFFReadRGBATile now
use TIFFRGBAImageOK before reading a per bug 110.

<li> libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
tif_dirwrite.c: Added routine
<a href=./man/TIFFDataWidth.3t.html>TIFFDataWidth</a> for determining
TIFFDataType sizes instead of working with tiffDataWidth array
directly as per bug 109.

<li>libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to
read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION,
TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC as per bug 99.

<li> libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__ as per bug 94.

<li> libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the
decodestrip function returns anything not greater than zero as per bug 97.

<li> libtiff/tif_jpeg.c: fixed computation of segment_width for 
tiles files to avoid error about it not matching the 
cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile 
size.") for ITIFF files.  Apparently the problem was incorporated since
3.5.5, presumably during the OJPEG/JPEG work recently.

<li> libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1 
(defined in tiffconf.h - 1 by default) then the RGBA interface
will assume that a fourth extra sample is ASSOCALPHA if the
EXTRASAMPLE value isn't set for it.  This changes the behaviour of
the library, but makes it work better with RGBA files produced by
lots of applications that don't mark the alpha values properly.
As per bugs 93 and 65.

<li> libtiff/tif_jpeg.c: allow jpeg data stream sampling values to 
override those from tiff directory.  This makes this work with 
ImageGear generated files. 

</UL>

<P><HR WIDTH=65% ALIGN=left>

<!-------------------------------------------------------------------------->
	
<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>

<UL>
	
<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Added page size setting
when creating PS Level 2.

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Fixed PS comment emitted when
FlateDecode is being used.

<li> <a href=./man/tiffsplit.1.html>tiffsplit</a>: increased the maximum
number of pages that can be split.

<li> <a href=./man/raw2tiff.1.html>raw2tiff</a>: Added option `-p' to
explicitly select color	space of input image data.

<li> <a href=./man/tiffmedian.1.html>tiffmedian</a>: Suppiort for large
(> 2GB) images.

<li> <a href=./man/ppm2tiff.1.html>ppm2tiff</a>: Fixed possible endless loop.

<li> <a href=./man/tiff2rgba.1.html>tiff2rgba</a>: Switched to use
<A HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImageOriented()</A>
instead of <A HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImage()</A>.

<li> <a href=./man/tiffcmp.1.html>tiffcmp</a>: Fixed problem with unused data
comparing (bug 349). `-z' option now can be used to set the number of reported
different bytes.

<li> <a href=./man/tiffcp.1.html>tiffcp</a>: Added possibility to specify
value -1 to -r option to get the entire image as one strip (bug 343).

<li> <a href=./man/tiffcp.1.html>tiffcp</a>: Set the correct RowsPerStrip
and PageNumber values (bug 343).
	
<li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Page numbering fixed (bug
341).

<li> <a href=./man/ppm2tiff.1.html>ppm2tiff</a>: PPM header parser improved:
now able to skip comments.

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Force deadzone printing when
EPS output specified (bug 325).

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Add ability to generate
PS Level 3. It basically allows one to use the /flateDecode filter for ZIP
compressed TIFF images. Patch supplied by Tom Kacvinsky (bug 328).
	
<li> <a href=./man/tiffcp.1.html>tiffcp</a>: Fixed problem with colorspace
conversion for JPEG encoded images (bugs 23 and 275)

<li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Applied patch from
Julien Gaulmin. More switches for fax2tiff tool for better control
of input and output (bugs 272 and 293).

<li> <a href=./man/raw2tiff.1.html>raw2tiff</a>:
New utility for turning raw raster images into TIFF files
written by Andrey Kiselev.

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>:
Sebastian Eken provided patches (bug 200) to add new these new 
switches:
  <ul>
    <li> <b>-b #</b>: for a bottom margin of # inches
    <li> <b>-c</b>: center image
    <li> <b>-l #</b>: for a left margin of # inches
    <li> <b>-r</b>: rotate the image by 180 degrees
  </ul>

Also, new features merged with code for shrinking/overlapping.

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Don't emit BeginData/EndData
DSC comments since we are unable to properly include the amount to skip
as per bug 80.

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Added workaround for some
software that may crash when last strip of image contains fewer number
of scanlines than specified by the `/Height' variable as per bug 164.

<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Patch from John Williams to add new 
functionality for tiff2ps utility splitting long images in several pages as
per bug 142. New switches:
	<ul>
		<li> <b>-H #</b>: split image if height is more than # inches
		<li> <b>-L #</b>: overLap split images by # inches
	</ul>

<li>  <a href=./man/tiff2ps.1.html>tiff2ps</a>: New commandline
switches to override resolution units obtained from the input file per bug 131:
	<ul>
		<li> <b>-x</b>: override resolution units as centimeters
		<li> <b>-y</b>: override resolution units as inches
	</ul>

<li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Updated to reflect
latest changes in libtiff per bug 125.

<li> tiff2ps: Division by zero fixed as per bug 88.

<li> <a href=./man/tiffcp.1.html>tiffcp<a>:
Added support for 'Orientation' tag.

<li> <a href=./man/tiffdump.1.html>tiffdump</a>:
include TIFFTAG_JPEGTABLES in tag list.

<li> tiffset: fix bug in error reporting.

</UL>

<P><HR WIDTH=65% ALIGN=left>

<!--------------------------------------------------------------------------->

<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
<UL> 

<li> Fixed distribution to include contrib/addtiffo/tif_ovrcache.{c,h}.
<li> libtiff/contrib/win95: renamed to contrib/win_dib.  Added new 
Tiffile.cpp example of converting TIFF files into a DIB on Win32 as per 
bug 143.

</UL>

<!--------------------------------------------------------------------------->

<A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION
KIT:</B></A>
<UL> 

<li> LZW compression kit synchronized with actual libtiff version.

</UL>

<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>

<HR>

Last updated $Date: 2003/10/04 11:38:17 $.

</BODY>
</HTML>