Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-q.one.com (mx-q.one.com [91.198.169.248])
	by mail6.b-one.net (Postfix) with ESMTP id BE8F78017F7FD
	for <filtered@awaresystems.be>; Sun, 29 Jul 2012 21:57:31 +0200 (CEST)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-q: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.212.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48])
	by mx-q.one.com (Postfix) with ESMTP id 52EF31092ED2
	for <filtered@awaresystems.be>; Sun, 29 Jul 2012 19:57:31 +0000 (UTC)
Received: by vbjk17 with SMTP id k17so5151420vbj.21
        for <filtered@awaresystems.be>; Sun, 29 Jul 2012 12:57:30 -0700 (PDT)
Received: by 10.220.240.5 with SMTP id ky5mr8732619vcb.57.1343591850267;
        Sun, 29 Jul 2012 12:57:30 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.58.208.231 with SMTP id mh7csp116551vec;
        Sun, 29 Jul 2012 12:57:29 -0700 (PDT)
Received: by 10.52.65.141 with SMTP id x13mr7653822vds.43.1343591849136;
        Sun, 29 Jul 2012 12:57:29 -0700 (PDT)
Received-SPF: neutral (google.com: 91.198.169.56 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=91.198.169.56;
Received: by 10.220.204.74 with POP3 id fl10mf4682587vcb.19;
        Sun, 29 Jul 2012 12:57:29 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-i.one.com (mx-i.one.com [91.198.169.56])
	by mail6.b-one.net (Postfix) with ESMTP id 31FA18017F7FB
	for <info@awaresystems.be>; Sun, 29 Jul 2012 21:43:06 +0200 (CEST)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-i.one.com (Postfix) with ESMTP id E67A0129ABB9
	for <info@awaresystems.be>; Sun, 29 Jul 2012 19:43:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id E4BBB3AD9D1;
	Sun, 29 Jul 2012 14:42:04 -0500 (EST)
Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130])
	by lists.maptools.org (Postfix) with ESMTP id 9669E1EDB48
	for <tiff@lists.maptools.org>; Sun, 29 Jul 2012 14:22:53 -0500 (EST)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
	by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q6TJMr9I025958;
	Sun, 29 Jul 2012 15:22:53 -0400 (EDT)
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Even Rouault <even.rouault@mines-paris.org>
In-reply-to: <201207292051.25569.even.rouault@mines-paris.org>
References: <25189.1343586898@sss.pgh.pa.us>
	<201207292051.25569.even.rouault@mines-paris.org>
Comments: In-reply-to Even Rouault <even.rouault@mines-paris.org>
	message dated "Sun, 29 Jul 2012 20:51:25 +0200"
Date: Sun, 29 Jul 2012 15:22:53 -0400
Message-ID: <25957.1343589773@sss.pgh.pa.us>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] So ... what about exporting TIFFDataSize?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: multipart/mixed; boundary="===============0259158075=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0259158075==

Even Rouault <even.rouault@mines-paris.org> writes:
> Le dimanche 29 juillet 2012 20:34:58, Tom Lane a écrit :
>> So, any objections to renaming this to TIFFDataSize() and exporting it?
>> Has anyone got a better naming suggestion than that?

> No better suggestion, but due to the fact that the difference between the 
> concepts of Size and Width might not be obvious to the reader, it might be 
> wise to be really explicit in the documentation of how they differ.

Oh, I quite agree ...

> If I understand well, TIFFDataWidth() is about the size on disk, and
> TIFFDataSize() the size in memory ?

As best I can tell, TIFFDataWidth gives the size of the datatype in a
TIFF file.  The reason there is a discrepancy is that libtiff chooses
to always work with RATIONAL tag values as if they were "float"s ---
what's stored in memory is a float, and conversion is performed when
reading or writing file data.  So users of TIFFGetField or TIFFSetField
need to treat RATIONAL tags as occupying 4 bytes per value not 8.

Perhaps rather than TIFFDataSize, we should choose a name that reflects
an association with Get/SetField.  I didn't come up with any obvious
choices though.

			regards, tom lane

--===============0259158075==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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