Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas002.isp.belgacom.be (localhost [127.0.0.1])
        by inav026.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id j9FGDBUj011852
        for <joris.at.lebbeke@skynet.be>; Sat, 15 Oct 2005 18:13:11 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx012.isp.belgacom.be (inmx012.isp.belgacom.be [195.238.3.90])
        by inas002.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id j9FGD2SE031650
        for <joris.at.lebbeke@skynet.be>; Sat, 15 Oct 2005 18:13: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 inmx012.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j9FGCpEl013266
        for <joris.at.lebbeke@skynet.be>; Sat, 15 Oct 2005 18:12:51 +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 j9FG6tgG016738;
	Sat, 15 Oct 2005 12:08:14 -0400
Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.206])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j9FG6q95016735
	for <tiff@lists.maptools.org>; Sat, 15 Oct 2005 12:06:53 -0400
Received: by qproxy.gmail.com with SMTP id q11so519259qbq
	for <tiff@lists.maptools.org>; Sat, 15 Oct 2005 09:06:51 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
	b=bMNKx/ZXAltcb1AImvkNbJE/1n3ord4SPhKtAeV04MO6HV2xQjbkT8JOZ9keq1QYuFgp6v7oepSGwNg0Hddbtb8Masv6s8wZFZLSJFsjkHe2ZPIUMAJHEfv7nCYexRz1cpW16/A7yimSXBIO1hUGeUZ9x0XQFw96VHba/+UJzMs=
Received: by 10.65.237.6 with SMTP id o6mr459746qbr;
	Sat, 15 Oct 2005 09:06:51 -0700 (PDT)
Received: by 10.65.155.9 with HTTP; Sat, 15 Oct 2005 09:06:51 -0700 (PDT)
Message-ID: <931f8ea90510150906t3879aaadm1ba8308ba63be7f8@mail.gmail.com>
Date: Sat, 15 Oct 2005 12:06:51 -0400
From: Frank Warmerdam <warmerdam@pobox.com>
To: Joris <joris.at.lebbeke@skynet.be>
In-Reply-To: <000701c5d186$192cdac0$ac98f651@dfgrrxsknr4e>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
References: <000701c5d186$192cdac0$ac98f651@dfgrrxsknr4e>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	j9FG6q95016735
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: [Tiff] Re: Small bug report, and error handler parameter issue
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.00000d26
X-MSP-STORE: Sat, 15 Oct 2005 18:13:15 +0200
Status:   

On 10/15/05, Joris <joris.at.lebbeke@skynet.be> wrote:
> 1) In LibTiff 3.7.4, tif_write.c, line 520:
>
>  if (tif->tif_dir.td_samplesperpixel == 1) {
>   /*
>    * Planarconfiguration is irrelevant in case of single band
>    * images and need not be included. We will set it anyway,
>    * because this field is used in other parts of library even
>    * in the single band case.
>    */
>   tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG;
>  } else {
>
> ...This last '==' should, I think, be '='.

Joris,

I have applied this change.

> 2) The issue of the parameters of the warning and error handlers has
> come up before. I totally fail to do anything meaningfull with warning
> and errors in a context that envolves multiple TIFF * in a single
> thread, because there is no TIFF * parameter in the warning and error
> handler callbacks, and thus the warnings and errors can't be traced to
> their TIFF context and dealt with properly.
>
> I now find myself in a situation where I really need that. So I've
> extended the error handler with that TIFF * parameter, and changed all
> TIFFError and TIFFWarning calls in the core library accordingly. I
> haven't updated any of the tools, I don't know if it will seriously
> impact those. Is there any chance this could find its way into CVS, so
> that I don't have to change again with each new update? I'm pretty sure
> people are all for the ability to present error more meaningfull then
> 'The TIFF file can not be opened because there was an error opening the
> TIFF file', even when multiple TIFFs are involved. I can't build a diff,
> but I can send the complete edited sources for you more tools-enabled
> Linux guys to diff.

This change would break many existing applications that
use libtiff (as I understand the change), and thus I don't
think it could be contemplated except as part of a major
generational step, presumably to libtiff 4.0.

So, my position is that it should not be done till we are needing
to do alot of other disruption.  These sort of API changes in a
stable and established library like libtiff cause alot of waves.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

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