2000.10.12 15:49 "libtiff-lzw", by Frank Warmerdam
Mike,
Stanislav has submitted some bug patches (or perhaps resubmitted is more accurate), one of which relates to the lzw support. I have put this into bugzilla as:
http://bugzilla.remotesensing.org/show_bug.cgi?id=16
His patches are reasonable, but I am wondering if we should take a slightly different approach.
- First, why is tif_lzw still in the default distribution? It seems that the default distribution should include no LZW implementation code if we are going to offer a whole patch kit for LZW support.
- Why are the changes to tif_dir.c not implemented within the core distribution based on whether LZW support is enabled, instead of applied via wholesale replacement of tif_dir.c? One problem is that tif_dir.c in the LZW kit isn't being kept up to date when I make changes to the other one.
- The managle-src.sh script seems to apply patches related to removing warnings and stuff. Shouldn't this be just controlled within the original source by the macro indicating if LZW support is available?
What I would like to see is the patch just installing a full tif_lzw.c implementation, and perhaps updating tiffconf.h to enable LZW. I think the default distribution should contain a tif_lzw.c, but that is empty so we don't have to change the makefiles when applying the patch. Everything else LZW related should be driven off the LZW_SUPPORT macro from tiffconf.h. If a user enable LZW by turning on this flag, but doesn't apply the tif_lzw.c patch then at link time they would get a TIFFInitLZW() missing link error.
I feel these changes would:
- Remove LZW liability for anyone working with the default kit since the LZW code isn't even physically present.
- Make maintenance easier, since there would be no code duplication.
- Make it clearer at build time whether LZW is actually enabled or not.
I can't remember too much about our discussions when you originally implemented the LZW patches, but I fear I am contradicting some of my advice at the time. In any event, I am willing to apply the suggested changes if you and other agree.
Best regards,
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent