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

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

    kusano 7d535a
    kusano 7d535a
    kusano 7d535a

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

      kusano 7d535a


      kusano 7d535a
      kusano 7d535a
      kusano 7d535a
      kusano 7d535a

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

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


            kusano 7d535a
            kusano 7d535a
            kusano 7d535a

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

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


              kusano 7d535a
              kusano 7d535a
              kusano 7d535a
              kusano 7d535a

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

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


                kusano 7d535a
                kusano 7d535a
                kusano 7d535a
                	
                kusano 7d535a

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

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


                  kusano 7d535a
                  kusano 7d535a
                  kusano 7d535a
                  kusano 7d535a

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

                  kusano 7d535a
                  kusano 7d535a
                  kusano 7d535a
                  kusano 7d535a
                  kusano 7d535a
                  Last updated $Date: 2011-04-09 21:01:00 $.
                  kusano 7d535a
                  kusano 7d535a
                  kusano 7d535a