2008.12.17 20:54 "[Tiff] Deleting tags from a directory", by Frank Warmerdam

2008.12.18 04:56 "[Tiff] tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam

Folks,

In ancient times, the only version information available to applications building against libtiff was:

#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.0beta3\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."

Circa 2000 or so I added:

/*

  */
#define TIFFLIB_VERSION 20081217

in tiffvers.h. This is the date of release.

However, as we split the 3.9 and 4.0 branches a "time stamp" no longer clearly defines the libtiff version well. So I propose to add:

/*

  */
#define TIFFLIB_RELEASE 040000

This macro should make it easy to do checks on features from different versions of libtiff. An example (whether TIFFUnsetField() is available) is demonstrated here:

#if TIFFLIB_VERSION >= 20081217 \
     && defined(TIFFLIB_RELEASE) && TIFFLIB_RELEASE >= 040000
         TIFFUnsetField( poGDS->hTIFF, TIFFTAG_COLORMAP );
#else
         CPLDebug( "GTiff",
                   "TIFFUnsetField() not supported, colormap may not be
cleared." );
#endif

Does the addition of TIFFLIB_RELEASE seem ok to folks? Any suggestions or caveats? Hmm, I just discovered that tiffvers.h is autogenerated by "make release" in the main libtiff makefile. Does anyone know why such a mechanism is used? It seems like it might be rather involved to cause it to generate the TIFFLIB_VERSION macro. I'm inclined to revert this to a manual process described in HOWTO-RELEASE unless someone sees a reason for it to be as complicated as it is now.

Best regards,


--
---------------------------------------+--------------------------------------

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam

and watch the world go round - Rush    | Geospatial Programmer for Rent