2006.10.23 16:22 "Re: [Tiff] How to Supress TIFFReadDirectory warning", by muthu kumar
Thankyou Bob Friesenhahn,
Now I have added the code as follows, and now i can successfully suppress the warning messages. Thankyou once again.
TIFFErrorHandler oldhandler; oldhandler = TIFFSetWarningHandler(NULL); TIFF *tiff = TIFFOpen((char*)(LPCTSTR)filename,"r"); TIFFSetWarningHandler(oldhandler);
--- Gerben Vos <Gerben@ZyLAB.COM> wrote:
On Sun, 22 Oct 2006, muthu kumar wrote:
I really don't know how to supress this warning
Bob Friesenhahn wrote:
Libtiff itself does not include any dialog windows.
Oh yes, tif_win32.c does.
Anyway, the easiest way to suppress warnings is to use TIFFSetWarningHandler(NULL). You may lose some more important warnings if you do that, but it's generally safe (they're only warnings, after all). It would be better to write a warning handler that filters out the uninteresting warnings and only shows the rest.
Also note that it is a global setting, not per-TIFF.
Another idea is to use tif_unix.c instead of tif_win32.c, it works too with most Windows versions and compilers. Then the warnings will be written to stderr (and probably lost in a GUI-based program).
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around