2005.11.15 09:38 "[Tiff] libtiff support for Microsoft Office Document Imaging", by Brad Hards

2005.11.15 14:40 "Re: [Tiff] libtiff support for Microsoft Office Document Imaging", by Frank Warmerdam

On 11/15/05, Brad Hards <bradh@frogmouth.net> wrote:

So the question is really about the magic number. I think it is bad style to add the MDI magic number without actually supporting MDI properly. So for tiffdump, I'm thinking of adding two more command line options (one that turns off the magic number check, and the other that turns on byte swapping)

For the library proper, I'd like to add another option to the client open mode array that disables the magic number check, and to extend the meaning of the l and b mode to be "if we are opening and the magic number check is disabled, use big or little (respectively) endian to interpret the file".

How does this look? Suggestions? Thoughts?

Brad,

I would suggest adding a potential #define in tiffconf.h that is MDI_SUPPORT. Normally it would not be defined. If defined, then .mdi files magic number is supported and byte swapping is done accordingly.

Depending on your level of success, the messiness and your willingness we might later want to incorporate MDI support into the core library (controlled by the MDI_SUPPORT flag).

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