2009.07.10 14:59 "Re: [Tiff] TIFFTAG_RICHTIFFIPTC definition", by Gary McGath
> Please can someone tell me why the TIFFTAG_RICHTIFFIPTC tag is defined as > using type TIFF_LONG? The information is actually an array of bytes not
> longs so swapping the bytes if the byte order of the computer and file > differ corrupts the data.
You're right. This is a historical mistake, and it leads to trouble.
My humble advice when it comes to writing is using the datatype TIFF_BYTE or TIFF_UNDEFINED. The latter is probably the most 'correct' as it literaly signifies that the data is of mixed type and byte order and widths of data members is defined outside the scope of TIFF. The datatype TIFF_BYTE can be used as amounting to the same thing, though, mostly.
This raises the old issue of verifying a format by the book vs. verifying it by "reasonable" usage. JHOVE, by a policy which was set from its inception, checks format compliance by the book; thus, correcting the data type for TIFFTAG_RICHTIFFIPTC will make JHOVE say the file is invalid.
I'm becoming steadily more convinced that by-the-book validation isn't the best approach, perhaps especially for TIFF, where Adobe hasn't revised "the book" in well over a decade. I've already implemented some compromises; this may be one more I should add.
Digital Library Software Engineer
Harvard University Library Office for Information Systems http://hul.harvard.edu/~gary/index.html