Return-Path: <tiff-bounces@lists.maptools.org>
Received: from infbas004.isp.belgacom.be (localhost [127.0.0.1])
        by inav001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k9NBTJVU002293
        for <joris.at.lebbeke@skynet.be>; Mon, 23 Oct 2006 13:29:25 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inas009.isp.belgacom.be (inas009.isp.belgacom.be [195.238.4.7])
        by infbas004.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k9NBTAIG013251
        for <joris.at.lebbeke@skynet.be>; Mon, 23 Oct 2006 13:29:11 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx003.isp.belgacom.be (inmx003.isp.belgacom.be [195.238.5.11])
        by inas009.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k9NBT04H017037
        for <joris.at.lebbeke@skynet.be>; Mon, 23 Oct 2006 13:29:02 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx003.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k9NBSxJw024089
        for <joris.at.lebbeke@skynet.be>; Mon, 23 Oct 2006 13:29:00 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k9NBKWJj017856;
	Mon, 23 Oct 2006 07:20:39 -0400
Received: from zynlfw01.zylab.com (mx.zylab.com [194.178.9.130])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k9NBKUJ6017853
	for <tiff@lists.maptools.org>; Mon, 23 Oct 2006 07:20:30 -0400
Received: from zynlms01.ZyLAB.WAN (zynlms01.zylab.wan [192.168.1.10])
	by zynlfw01.zylab.com (Postfix) with ESMTP id 91EE82AE;
	Mon, 23 Oct 2006 12:45:45 +0200 (CEST)
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Subject: Re: [Tiff] How to Supress TIFFReadDirectory warning
Date: Mon, 23 Oct 2006 13:19:49 +0200
Message-ID: <FC840EC0BF7BFA45A0F94548AF36920D020CA642@zynlms01.ZyLAB.WAN>
In-Reply-To: <Pine.SOC.4.60.0610222223300.889@blade.simplesystems.org>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Tiff] How to Supress TIFFReadDirectory warning
thread-index: Acb2Vr7DbpsGDHkuQ2ylJXI3lA+z1gAPTsVA
From: "Gerben Vos" <Gerben@zylab.com>
To: <tiff@lists.maptools.org>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	k9NBKUJ6017853
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00001c6f
X-MSP-STORE: Mon, 23 Oct 2006 13:29:32 +0200
Status:   

> 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).

					Gerben Vos.

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
