2004.08.29 02:34 "[Tiff] tif_fd and error handling", by Joris Van Damme

2004.08.29 02:34 "[Tiff] tif_fd and error handling", by Joris Van Damme


Last time I compiled and integrated LibTiff, version number was 3.5.7, and I spent a lot of hours making modifications. This time, I got smarter, and set out to not change LibTiff all over again, if I can help it.

However, I'm having two problems (sofar).

  1. For various reasons that I cannot elaborate upon, I need my equivalent of tif_win32 to treat TIFF* as opaque. Thus, I had this problem that I signalled with tif_fd while ago (http://www.asmail.be/msg0054799560.html). Frank made a kind comment, Ross investigated, but... how is this going to help me not changing LibTiff?
  2. I find the TIFFError and related completely useless. It is feeded no context whatsoever, neither a TIFF*, nor a tif_clientdata, nor a tif_fd. This may be fine in the typical Unix command-line tool that handles a single TIFF or set of TIFFs and knows what the errors are about and simply feeds them to the console and exits. But anything beyond that, from file browser to image editor or whatever, needs an indication of context together with the warning and error messages. I could either revert to Photoshop-style meaningfull messages, like 'The TIFF file cannot be opened because there was an error opening the TIFF file', or I could make my LibTiff modifications all over again and add that context to all TIFFError and TIFFWarning calls... I find neither option acceptable. I cannot understand why any of you is not bitten by this problem that was signalled as early as 1994 (http://www.asmail.be/msg0054815913.html). Is there something I am missing? How do you folks deal with this?

Joris Van Damme
Download your free TIFF tag viewer for windows here: