roentgen b75cab
roentgen b75cab
roentgen b75cab
<title></title>
roentgen b75cab
	Changes in TIFF v4.0.0
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab
<font face="Helvetica, Arial, Sans"></font>
roentgen b75cab
<font face="Helvetica, Arial, Sans"> </font>
roentgen b75cab
roentgen b75cab
<basefont size="4"></basefont>
roentgen b75cab
<font size="+3">T</font>IFF <font size="+2">C</font>HANGE <font size="+2">I</font>NFORMATION
roentgen b75cab
<basefont size="3"></basefont>
roentgen b75cab
roentgen b75cab
    roentgen b75cab

    roentgen b75cab
    Current Version: v4.0.0
    roentgen b75cab
    Previous Version: v3.9.5
    roentgen b75cab
    Master FTP Site: 
    roentgen b75cab
    ftp.remotesensing.org, directory pub/libtiff
    roentgen b75cab
    Master HTTP Site: 
    roentgen b75cab
    http://download.osgeo.org/libtiff 
    roentgen b75cab

    roentgen b75cab
    roentgen b75cab
    roentgen b75cab

    roentgen b75cab
    This document describes the changes made to the software between the
    roentgen b75cab
    previous and current versions (see above).  If you don't
    roentgen b75cab
    find something listed here, then it was not done in this timeframe, or
    roentgen b75cab
    it was not considered important enough to be mentioned. Please consult
    roentgen b75cab
    the ChangeLog file in the source package for full change details.  The
    roentgen b75cab
    following information is located here:
    roentgen b75cab
      roentgen b75cab
    • Major Changes
    • roentgen b75cab
    • Changes in the software configuration
    • roentgen b75cab
    • Changes in libtiff
    • roentgen b75cab
    • Changes in the tools
    • roentgen b75cab
    • Changes in the contrib area
    • roentgen b75cab
      roentgen b75cab

      roentgen b75cab


      roentgen b75cab
      roentgen b75cab
      roentgen b75cab
      roentgen b75cab

      <font size="+3">M</font>AJOR CHANGES:

      roentgen b75cab
      roentgen b75cab
      BigTIFF support changes:
      roentgen b75cab
      roentgen b75cab
        roentgen b75cab
        roentgen b75cab
        	
      • The options parameter in the TIFFOpen and TIFFClientOpen funcs has
      • roentgen b75cab
        	been extended. When creating new files, you can add option '4' to
        roentgen b75cab
        	specify you want to create a ClassicTIFF file, though that is the
        roentgen b75cab
        	default and the option is not strictly necessary. (As such, old
        roentgen b75cab
        	calling code will continue to function and create ClassicTIFF files.)
        roentgen b75cab
        	Or you can add option '8' to specify you want to create a BigTIFF file
        roentgen b75cab
        	instead. This new option is also reflected in some of the tools we
        roentgen b75cab
        	already upgraded. For instance, you can use the -8 option on tiffcp to
        roentgen b75cab
        	have tiffcp produce BigTIFF files instead of the default ClassicTIFF.
        roentgen b75cab
        	(Whilst on additional option is provided for version selection when
        roentgen b75cab
        	creating new files, no such option is necessary when reading TIFF
        roentgen b75cab
        	files. LibTiff reads ClassicTIFF and BigTIFF both, and the application
        roentgen b75cab
        	does not need to be aware which TIFF version an opened file is.)
        roentgen b75cab
        roentgen b75cab
        	
      • Although the tag count in BigTIFF is 64bit, we restricted the
      • roentgen b75cab
        	count in the implementation to a much more reasonable size. This is
        roentgen b75cab
        	necessary in current implementation, because all tag data gets read
        roentgen b75cab
        	automatically in the IFD reading stage, so if there's half a dozen
        roentgen b75cab
        	private tags with multiple gigabytes of data that causes considerable
        roentgen b75cab
        	overhead even if the application level is never interested in these
        roentgen b75cab
        	tags. Our choice to ignore tags with data longer then a certain sanity
        roentgen b75cab
        	value is much needed as things stand. We also recommend to step away
        roentgen b75cab
        	from writing tiles that are 8 kilobyte in their uncompressed form, or
        roentgen b75cab
        	writing single-line strips, in really big files, resulting in mega's
        roentgen b75cab
        	of tiles or strips. It's much more efficient to choose bigger tile or
        roentgen b75cab
        	strip sizes, up to several megabyte if needed, and have a few kilo of
        roentgen b75cab
        	tiles or strips instead.
        roentgen b75cab
        roentgen b75cab
        	
      • Although it's rare, some application code does directly access
      • roentgen b75cab
        	file offsets. Some of these are automatically upgraded because they
        roentgen b75cab
        	used the toff_t type, others need to be aware that the datatype
        roentgen b75cab
        	changed and need to start using toff_t or uint64. This impacts access
        roentgen b75cab
        	to tags like the EXIF IFD tag, for example, or the SubIfds tag, or to
        roentgen b75cab
        	StripOffsets or TileOffsets, the return type of functions like
        roentgen b75cab
        	TIFFCurrentDirOffset, and a parameter type to functions like
        roentgen b75cab
        	TIFFSetSubDirectory.
        roentgen b75cab
        roentgen b75cab
        	
      • Although it's rare, some application code does use structures
      • roentgen b75cab
        	like TIFFHeader or TIFFDirEntry that used to be an exact binary
        roentgen b75cab
        	representation of TIFF structures. These need to change. The old
        roentgen b75cab
        	TIFFHeader structure is replaced by the new TIFFHeaderClassic,
        roentgen b75cab
        	TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact
        roentgen b75cab
        	binary representation of the ClassicTIFF and BigTIFF header, and of
        roentgen b75cab
        	the part that is common to both. There is no new equivalent for the
        roentgen b75cab
        	old TIFFDirEntry structure (or more precisely, there is still a
        roentgen b75cab
        	TIFFDirEntry structure, but it is changed, moved to library-private
        roentgen b75cab
        	definition, and no longer an exact binary representation of the tag
        roentgen b75cab
        	structure of either TIFF version).
        roentgen b75cab
        roentgen b75cab
        	
      • Sizer functions, like TIFFTileSize or TIFFScanlineSize and the
      • roentgen b75cab
        	like, return a tmsize_t value (tmsize_t is defined as int32 on 32bit
        roentgen b75cab
        	machines, and int64 on 64bit machines, and as such it is meant to
        roentgen b75cab
        	represent signed memory sizes). This is because we figure 98% of the
        roentgen b75cab
        	calling code uses the return value as sizes in allocations and the
        roentgen b75cab
        	like. So, any overflow that is theoretically possible with BigTIFF
        roentgen b75cab
        	when LibTiff is running on a 32bit system, is best detected inside the
        roentgen b75cab
        	sizer functions and it is best to return a type that makes sense as a
        roentgen b75cab
        	memory size. If your calling code is the exception and is interested
        roentgen b75cab
        	in actual file size, you best use the newer TIFFTileSize64 or
        roentgen b75cab
        	TIFFScanlineSize64 function that returns an uint64 type.
        roentgen b75cab
        roentgen b75cab
        	
      • These TIFF tags require a 64-bit type as an argument in
      • roentgen b75cab
        	libtiff 4.0.0:
        roentgen b75cab
        	
          roentgen b75cab
          	
        • TIFFTAG_FREEBYTECOUNTS
        • roentgen b75cab
          	
        • TIFFTAG_FREEOFFSETS
        • roentgen b75cab
          	
        • TIFFTAG_STRIPBYTECOUNTS
        • roentgen b75cab
          	
        • TIFFTAG_STRIPOFFSETS
        • roentgen b75cab
          	
        • TIFFTAG_TILEBYTECOUNTS
        • roentgen b75cab
          	
        • TIFFTAG_TILEOFFSETS
        • roentgen b75cab
          	
          roentgen b75cab
          roentgen b75cab
          roentgen b75cab
          roentgen b75cab
          Other important backward incompatible changes in the public API:
          roentgen b75cab
          roentgen b75cab
            roentgen b75cab
            	
          • TIFFRewriteField() renamed into _TIFFRewriteField() and moved out
          • roentgen b75cab
            	from the public interface (from tiffio.h to tiffiop.h). Type of its
            roentgen b75cab
            	'count' parameter changed from uint32 to tmsize_t.
            roentgen b75cab
            roentgen b75cab
            	
          • TIFFMergeFieldInfo() returns non-void result now. It returns 0
          • roentgen b75cab
            	if successful and -1 if failed. Though this is now obsoleted function
            roentgen b75cab
            	and should not be used in new programs. Use the new tag extension
            roentgen b75cab
            	scheme instead.
            roentgen b75cab
            roentgen b75cab
            	
          • TIFFFieldWithTag() and TIFFFieldWithName() functions now return
          • roentgen b75cab
            	pointer to TIFFField constant object instead of TIFFFieldInfo.
            roentgen b75cab
            roentgen b75cab
            	
          • TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration
          • roentgen b75cab
            	have been removed. They was unused and never been used properly.
            roentgen b75cab
            	Should be unneeded for high-level applications.
            roentgen b75cab
            roentgen b75cab
            	
          • TIFFTagValue structure removed from the public tiffio.h
          • roentgen b75cab
            	to private tif_dir.h and not accessible anymore. It should be unneeded
            roentgen b75cab
            	for high-level applications.
            roentgen b75cab
            roentgen b75cab
            roentgen b75cab
            roentgen b75cab


            roentgen b75cab
            roentgen b75cab
            roentgen b75cab

            <font size="+3">C</font>HANGES IN THE SOFTWARE CONFIGURATION:

            roentgen b75cab
            roentgen b75cab
              roentgen b75cab
              roentgen b75cab
              	
            • Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool
            • roentgen b75cab
              	2.4.
              roentgen b75cab
              roentgen b75cab
              	
            • Enabled support for Automake silent build rules
            • roentgen b75cab
              	(--enable-silent-rules or 'make V=0')
              roentgen b75cab
              roentgen b75cab
              	
            • Enabled support for Automake colorized and parallel tests.
            • roentgen b75cab
              roentgen b75cab
              	
            • Added detection of 64-bit integer types since libtiff 4.0
            • roentgen b75cab
              	requires use of 64-bit signed and unsigned integer types.
              roentgen b75cab
              roentgen b75cab
              	
            • Libtiff now provides a more comprehensive test suite with
            • roentgen b75cab
              	over 72 tests, which may be executed on Unix-like systems, or
              roentgen b75cab
              	under Microsoft Windows using MinGW/MSYS or Cygwin.
              roentgen b75cab
              roentgen b75cab
              	
            • --disable-lzma configure option to disable use of liblzma.
            • roentgen b75cab
              roentgen b75cab
              	
            • --enable-defer-strile-load configure option to enable
            • roentgen b75cab
              	experimental deferred strip/tile offset/size loading.  May
              roentgen b75cab
              	cause some extremely sophisticated uses of libtiff to fail.
              roentgen b75cab
              roentgen b75cab
              	
            • --enable-chunky-strip-read configure option to enable
            • roentgen b75cab
              	experimental enable reading large strips in chunks in
              roentgen b75cab
              	TIFFReadScanline().
              roentgen b75cab
              roentgen b75cab
              	
            • Now always uses WIN32 native I/O functions for Microsoft
            • roentgen b75cab
              	Windows except for under Cygwin.
              roentgen b75cab
              roentgen b75cab
              	
            • Now provides a pkg-config support file (libtiff-4.pc).
            • roentgen b75cab
              roentgen b75cab
              roentgen b75cab
              roentgen b75cab


              roentgen b75cab
              roentgen b75cab
              roentgen b75cab
              roentgen b75cab

              <font size="+3">C</font>HANGES IN LIBTIFF:

              roentgen b75cab
              roentgen b75cab
                roentgen b75cab
                roentgen b75cab
                        
              • Patches/fixes made to stable libtiff (v3.9.X) are also
              • roentgen b75cab
                        applied to 4.0.0.  There are too many to list here.  See the
                roentgen b75cab
                        distribution ChangeLog for a detailed change list.
                roentgen b75cab
                roentgen b75cab
                	
              • There is considerable change in some files like
              • roentgen b75cab
                	tif_dirread and tif_dirwrite. These changes don't impact
                roentgen b75cab
                	backwards compatibility, they are mostly a clean rewrite that
                roentgen b75cab
                	does allow BigTIFF support as well as somewhat more robust
                roentgen b75cab
                	reading of the unexpected already and will also serve future
                roentgen b75cab
                	API extension but does not impact current API or functionality
                roentgen b75cab
                	in a negative way that you need to know about.
                roentgen b75cab
                roentgen b75cab
                	
              • Although there is still a functional definition for types
              • roentgen b75cab
                	like toff_t (file offset), tstrip_t (strip index number), etc,
                roentgen b75cab
                	we recommend against using these in newer code. We have
                roentgen b75cab
                	learned that it is next to impossible to use these
                roentgen b75cab
                	consistently and make real abstraction of the binary format of
                roentgen b75cab
                	these types. Instead, at a certain level we always end up
                roentgen b75cab
                	doing casts anyway, and taking the exact binary format into
                roentgen b75cab
                	account, so these types are nothing but dangerously misleading
                roentgen b75cab
                	and obfuscating. You do not need to update calling code that
                roentgen b75cab
                	uses them, as 99.9% of such code will continue to work. But we
                roentgen b75cab
                	recommend against using them in newer calling code, and we
                roentgen b75cab
                	started replacing them with binary clear types like uint16,
                roentgen b75cab
                	uint32 and such in the library.
                roentgen b75cab
                roentgen b75cab
                	
              • We do use and will continue to use one functional type
              • roentgen b75cab
                	that is an exception to the above rule, being tmsize_t. This
                roentgen b75cab
                	is a signed memory size type, i.e. it is int32 on 32bit
                roentgen b75cab
                	machines, or int64 on 64bit machines.
                roentgen b75cab
                roentgen b75cab
                	
              • Optionally support LZMA compression via TIFF tag 34925.
              • roentgen b75cab
                	Tiffcp supports compression levels similar to "-c lzma:p1" or
                roentgen b75cab
                	"-c zip:p9 for setting the LZMA compression parameters.
                roentgen b75cab
                roentgen b75cab
                	
              • Optionally defer the load of strip/tile offset and size
              • roentgen b75cab
                	tags for optimized scanning of directories.  Enabled with the
                roentgen b75cab
                	--enable-defer-strile-load configure option (DEFER_STRILE_LOAD
                roentgen b75cab
                	#define in tif_config.h).
                roentgen b75cab
                roentgen b75cab
                	
              • Optionally enable experimental support for reading big
              • roentgen b75cab
                	strips in chunks.  Enabled with the --enable-chunky-strip-read
                roentgen b75cab
                	configure option.
                roentgen b75cab
                roentgen b75cab
                roentgen b75cab
                roentgen b75cab


                roentgen b75cab
                roentgen b75cab
                roentgen b75cab
                	
                roentgen b75cab

                <font size="+3">C</font>HANGES IN THE TOOLS:

                roentgen b75cab
                roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab
                  	
                • tiffset: add -d and -sd switches to allow operation on
                • roentgen b75cab
                  	a particular directory, not just the first.
                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab


                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab

                  <font size="+3">C</font>HANGES IN THE CONTRIB AREA:

                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab
                  Last updated $Date: 2011-04-09 21:01:00 $.
                  roentgen b75cab
                  roentgen b75cab
                  roentgen b75cab