AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.09.08 02:15 "[Tiff] TIFF Property Sheet Shell Extension beta", by Ross A. Finlayson
2004.09.17 22:15 "RE: [Tiff] BigTIFF Tag Value Count issue", by Bob Friesenhahn
[...]

2004.09.08 02:15 "[Tiff] TIFF Property Sheet Shell Extension beta", by Ross A. Finlayson

Hello,

It's nice to write to you again.

A month or so ago, I got around to working on an idea I've had for some time, a small program to add to the toolkit for working with TIFF image files. When first working on reading these image files, I was developing on Windows and made much use of the Wang Imaging property sheet shell extension to get quick information about a given TIFF file. The corpus of images that I test TIFF software upon is some hundreds of images from scores of sources. Anyways, that is a useful previewer and convenient, but I want some more information there.

Thus, basically I am writing to tell about yet another property sheet shell extension that is yet another TIFF tag viewer and value inspector. If you work with TIFF files, you might find it handy in giving another source of information about a TIFF file to go along with the libtiff tools and other useful, functional, free beer TIFF file structure viewers. I've tried Joris' TIFFTagViewer, and tiffinfo/tiffdump, and it meets similar requirements.

It doesn't do any image data recognition or decompression, it only concerns itself with the file structure. It's read-only. It should work with large files, id est, the maximum file size, but currently it limits itself to 2GB files until I figure out the signed/unsigned offset type. It does not actually use libtiff. It loads a file and reads its fields, if it can, and then displays the result in a tree view control. It has integrated help so you can get some extended information about a field and its contents, and where to look for more information about the contents of the field.

There are probably some TIFF fields that it would not recognize, they are mostly rare and not often seen in the wild. I cobbled together the TIFF software variously in C++ and by generating source code from an XML description of TIFF fields. I use the Xalan XSL-T processor, but no extensions. I tried to gather all known TIFF fields into this knowledge base of descriptions of the fields and their contents. In that sense it recognizes TIFF, TIFF technical note 1-4 and Deflate/JPEG, TIFF-F, TIFF-FX, TIFF/IT, TIFF/EP, GeoTIFF, and Exif specified fields.

I wonder what file extensions besides .tif and .tiff denote TIFF image data. A MIME registration denotes .tfx as a TIFF-FX file extension. Are some TIFF/IT files with .fp, and some Exif files with .exif? More often the FP image is in an IFD with image description set to the file name with extension ".FP". There are many files containing TIFF compatible structures with various file extensions. Anyways it just registers for .tif and .tiff.

Some of the field descriptions I have may be incorrect. For example, if I develop from the TIFF/IT and TIFF/EP public committee drafts, then there may be a modification in the final standard. The IPTC/NAA record, mentioned in TIFF/EP and the Solo format document, may have other fields in use, I don't bother to interpret the record. I would like a copy of the RichTIFF spec if you happen to have one. There are a variety of Wang imaging private tags besides the annotation tag that contain useful information, eg station identifier, please let me know if you know the meaning of those values and can provide their specification. If a file uses TIFF 4.0 ColorResponseCurves, this software thinks it's a TransferFunction, because they use the same tag. In browsing images I've discovered dozens of tags I've never noticed before.

It's troublesome to deal with both EXIF and TIFF/EP. EXIF maintains its own IFD-type structure with tags, TIFF/EP just puts all those tags in the main IFD, some of the tags have the same name and different literal values, mostly they are compatible, but it's extra work to generate unique identifiers that identify them as equivalent without getting away from one symbolic constant for each literal 16-bit integer. Basically I built the file loader to deal with private IFD's with overloaded tag identifiers, for example how an Exif Makernote might use 0x0001, as does a tag in the GPSInfo IFD, assigning each type of IFD a "mode". The only overloaded tag that I've seen in a default directory is ColorResponseCurves/TransferFunction, but there are various types of contents of some of the tags.

About Exif, most Exif data is probably in JFIF/JPEG files instead of TIFF files, and the APP marker in the JPEG data stream is then in the format of a TIFF structured data stream, requiring the ability to work with the offsets given in the fields of the Exif structure from the arbitrary zero of the beginning of the structure in the APP marker.

Another set of items to consider are things like Wang annotations, IPTC data, component configuration and decode, Adobe Photoshop blocks, and various other specified or private data structures stored in fields with type BYTE, ASCII, UNDEFINED, etcetera. A future iteration should well have a more appropriate display of those widely used data structures.

The numeric literals displayed are in hexadecimal for tags and offsets, and decimal for enumerated values and integer values besides for BYTE. Strings are shown as comma-separated quote-delimited strings with non-printable values printed as \ddd with the octal escape. You can drag and drop branches of the tree as text data, but only to some drop targets, not currently any drop target that accepts text, that has something to do with clipboard formats and shell extensions.

I wrote the shell extension as an in-process self-registering DLL. I got much insight about writing shell extensions from an MSJ article from MSDN, by Jeff Prosise, where he thanks Greg Keyser, that's some great amount of information on the MSDN CD libraries from almost ten years ago, March 1995. Other than the shell extension it was a lot of trawling through MSDN as I have not written any non-trivial Win32 applications, although this is almost non-trivial. TIFF 6.0 is from 1992. Obviously enough the Windows shell extension only works on Windows. That's debatable. I use the Inno Setup software to generate the installer. The installer puts tiffprop.dll and tiffprop.hlp in the Windows system directory, and registers the component, and the software is removable from Add/Remove. I've been using this software and it seems to be safe and relatively bulletproof. It's easy to crash it, I guess.

You can download this software from http://www.tiki-lounge.com/~raf/tiff/tiffprop.html. Please help me beta test it and notify me of your results with it. I'm still "Apex Internet Software", if you have any questions about this you can ask me. It's going to be an "Apex Internet Software" product. I hope it's appropriate to ask you to beta-test it for me and let me know that you do. Particularly if you find bugs with it I am interested in quashing them. Then you will get a free copy and free updates if this little tool is not free. It's a general interest tool for users of TIFF image files.

Basically the only features that it offers over tiffinfo/tiffdump are to print multiple strings and enumerate subdirectories. Also it's integrated with the Windows shell so three clicks from the TIFF file in Explorer shows the document information.

Good luck, warm regards,

Ross F.