Received: from mailgate005.isp.belgacom.be (mailgate005.isp.belgacom.be [195.238.6.92])
	by maildelivery012.isp.belgacom.be (Postfix) with ESMTP id 48FAE254008
	for <joris.at.lebbeke@skynet.be>; Thu, 26 Jul 2007 17:15:17 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 26 Jul 2007 17:15:14 +0200
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 l6QEsP6T001128;
	Thu, 26 Jul 2007 10:54:39 -0400
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l6QEsMpU001125
	for <tiff@lists.maptools.org>; Thu, 26 Jul 2007 10:54:22 -0400
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	l6QEsLW7009322; Thu, 26 Jul 2007 09:54:21 -0500 (CDT)
Date: Thu, 26 Jul 2007 09:54:21 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@blade.simplesystems.org
To: Jay Berkenbilt <ejb@ql.org>
Subject: Re: [Tiff] possible ABI change in 3.9.0 beta?
In-Reply-To: <20070726073734.0454957501.qww314159@soup.q.qbilt.org>
Message-ID: <Pine.SOC.4.60.0707260938390.922@blade.simplesystems.org>
References: <20070714080029.GA20272@ak4719.spb.edu>
	<20070722115825.0445013738.qww314159@soup.q.qbilt.org>
	<46A4B4FF.1040109@pobox.com>
	<20070726073734.0454957501.qww314159@soup.q.qbilt.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: Tiff List <tiff@lists.maptools.org>
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.00002696
X-MSP-STORE: Thu, 26 Jul 2007 17:15:17 +0200
Status: RO

On Thu, 26 Jul 2007, Jay Berkenbilt wrote:
>> I normally think of the TIFFRGBAImage structure as internal to the library
>> but I suppose it is legal for applications to provide custom functions
>> for use with it that are dependent on the internals of this structure so
>> it is indeed public.

The comments in tiffio.h suggest that applications can/should use this 
structure, and since it is in a non-private structure it must be part 
of the public interface.  The interface is formally documented in 
libtiff documentation, with a direct link to the documentation 
("TIFFRGBAImage Support") from the main API description page at 
http://remotesensing.org/libtiff/libtiff.html.  This page recommends 
allocating TIFFRGBAImage on the application's stack.

> The reason that libtiff in debian uses soname 4 rather than 3 is
> because of a change in that very structure at some point in the
> distant past (like 3.6.1 or something) which broke a whole bunch of
> gnome-based image processing programs, so it is most definitely part
> of the public interface.

This structure is a terrible thing to expose as it is.  If it still 
needs to be publically exposed, this would be a good time (in 4.0) to 
add copious padding to the end of the structure definition so that new 
members can be added after existing members using the reserved space. 
This approach assumes that libtiff is responsible for initializing the 
structure. Another forward-looking approach is to provide an 
allocation fuction so that libtiff allocates TIFFRGBAImage from the 
heap rather than on the using application's stack.  This approach only 
requires that libtiff keep existing members in the same position.

Does anyone have an idea how many applications are using 
TIFFRGBAImage?

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

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