Received: from [207.176.88.85] by phillip.cerious.com (NTMail 3.03.0017/7.aaxh) with ESMTP id pcrews for <pcrews@cerious.com>; Mon, 13 Mar 2000 12:39:57 -0500
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id MAA19319;
	Mon, 13 Mar 2000 12:08:26 -0500
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Mon, 13 Mar 2000 12:07:17 -0500
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id MAA19241
	for tiff-outgoing; Mon, 13 Mar 2000 12:07:17 -0500
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from e4000.petris.com (e4000.petris.com [204.120.226.12])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id MAA19238
	for <tiff@olympiakos.com>; Mon, 13 Mar 2000 12:07:14 -0500
Received: from petris.com (mpd-bfc.petris.com [204.120.226.101])
	by e4000.petris.com (8.8.8+Sun/8.8.8) with ESMTP id LAA09202;
	Mon, 13 Mar 2000 11:08:25 -0600 (CST)
Message-ID: <38CD2047.A13CC441@petris.com>
Date: Mon, 13 Mar 2000 11:07:19 -0600
From: Bruce Cameron <cameron@petris.com>
Organization: Petris Technologies, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD NSCPCD47  (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Frank Warmerdam <warmerda@home.com>
CC: "tiff@olympiakos.com" <tiff@olympiakos.com>
Subject: Re: TIFF image file size
References: <38CCF70F.FB9FACA5@petris.com> <38CCC6FE.E78E3408@home.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@olympiakos.com

When you say 'file offset' I presume you mean strip offset, or an offset
the TIFF write process has to use to place header information at the
end of the file.  It seems to me that if the header were at the start
of the file, then the size limitation is moot [except that the bytes
per strip are also limited to a [signed?unsigned?] integer.  Although
I don't know if it is possible to ensure that the header data is at
the start of the file.

Frank Warmerdam wrote:

> 
> Bruce,
> 
> The most recent release version of libtiff (which this application may
> be using) uses signed integers for file offset, and this implicitly
> limits
> seeks to be within the first 2GB.  I presume the application has
> successfully
> written the image data beyond the 2GB limit (because no seeks are
> required)
> but when it tries to write the directory while closing the file a seek
> is done
> and this fail.  I suspect BitsPerSample is just the first tag that it
> tries
> to write to the directory.
> 
> The current CVS source contains patches to use unsigned offsets for file
> positions, and allows writing and reading up to 4GB files successfully.
> Because TIFF itself uses 32bit offsets in the format, it is not possible
> to
> go beyond 4GB without changing the format, or making some really funky
> assumptions.
> 
> Best regards,
> 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerda@home.com
> light and sound - activate the windows |
> http://members.home.com/warmerda
> and watch the world go round - Rush    | Geospatial Programmer for Rent
