AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.12.04 00:50 "tiffdump prints some tags incorrectly", by eponymous alias
2003.01.24 05:30 "Old Style JPEG Compression", by Venkatesh BabuLall

2002.12.04 00:50 "tiffdump prints some tags incorrectly", by eponymous alias

tiffdump (in tiff-v3.5.7) sometimes fails to report out

tag values correctly. A specific instance is an array of two SHORT values, such as the PageNumber tag (Section 12 of the TIFFv6 specification). The problem is that both the PrintByte() and PrintShort() routines in tiffdump.c use oversimplified logic:

    if (hdr.tiff_magic != TIFF_LITTLEENDIAN) {

to try to figure out the ordering of values, rather than the swabflag (if testing a flag is even needed here) which is defined elsewhere for a related purpose. A specific situation in which this bug is manifested is reading a big-endian TIFF file on a big-endian machine (SPARC Solaris, in my case). In this case, the two values of PageNumber are printed in the wrong order.

Glenn Herteg

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com