AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.02.12 20:12 "Accessing tif->tif_clientdata within my own error and warning functions", by Philip Watkinson
2009.02.13 08:13 "Re: Accessing tif->tif_clientdata within my own error andwarning functions", by Joris Van Damme
2009.02.17 16:17 "Re: Accessing tif->tif_clientdata within my own error andwarning functions", by Philip Watkinson
2009.02.17 17:04 "FW: Accessing tif->tif_clientdata within my own error andwarning functions", by Philip Watkinson
2009.02.17 18:24 "Re: FW: Accessing tif->tif_clientdata within my own error andwarning functions", by Bob Friesenhahn
2009.02.17 21:36 "Re: Accessing tif->tif_clientdata within my own error andwarning functions", by Joris Van Damme
2009.02.17 21:11 "Re: Accessing tif->tif_clientdata within my own errorandwarning functions", by Joris Van Damme

2009.02.17 18:24 "Re: FW: Accessing tif->tif_clientdata within my own error andwarning functions", by Bob Friesenhahn

On Tue, 17 Feb 2009, Philip Watkinson wrote:
>
> Next question - It looks like the warning and error handling is not thread
> safe. I guess that I would have to add function pointers to TIFF?

Most thread APIs provide a means for thread-specific data.  This 
includes both POSIX and Win32.  Even if the thread API does not 
include interfaces for thread-specific data, it is easy to build one. 
You should be able to use thread-specific data in order to help make 
up for this design weakness in libtiff.

For an example "portable" TSD wrapper, see GraphicsMagick

http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/tsd.c
http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/tsd.h

and how it was used in the TIFF coder:

http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/coders/tiff.c

Every application has different requirements.  For GraphicsMagick, it 
is only necessary to capture the error info for when the call returns. 
Other applications may need to display an immediate dialog box.

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