AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.08.25 19:36 "[Tiff] GDAL Unofficial Private TIFF Tags", by Frank Warmerdam
2004.08.25 22:52 "Re: [Tiff] GDAL Unofficial Private TIFF Tags", by Joris
2004.08.25 23:48 "Re: [Tiff] GDAL Unofficial Private TIFF Tags", by Chris Cox
2004.08.26 00:18 "Re: [Tiff] GDAL Unofficial Private TIFF Tags", by Joris
2004.08.26 01:19 "Re: [Tiff] GDAL Unofficial Private TIFF Tags", by Chris Cox
2004.08.28 01:37 "[Tiff] JBIG and JPEG2000", by Joris
2004.08.29 02:34 "[Tiff] tif_fd and error handling", by Joris
2004.08.29 04:48 "Re: [Tiff] tif_fd and error handling", by Bob Friesenhahn
2004.08.29 10:26 "Re: [Tiff] tif_fd and error handling", by Joris
2004.08.29 19:50 "Re: [Tiff] tif_fd and error handling", by Andrey Kiselev
2004.08.29 20:04 "Re: [Tiff] tif_fd and error handling", by Bob Friesenhahn
2004.08.30 17:29 "Re: [Tiff] tif_fd and error handling", by Joris
2004.08.30 18:30 "Re: [Tiff] tif_fd and error handling", by Andrey Kiselev

2004.08.29 04:48 "Re: [Tiff] tif_fd and error handling", by Bob Friesenhahn

  1. 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?

I agree with Erik Corry's (and Joris's) opinion. Any asynchronous error reporter should pass user supplied context.

However, not all hope is lost. Multithread environments normally provide the means to obtain the current thread ID. As long as the per-thread context is associated with the thread before libtiff is called, then the current thread ID may be used to retrieve it within the warning/error handler.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen