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 11:21:07 -0500
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id KAA17365;
	Mon, 13 Mar 2000 10:50:31 -0500
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Mon, 13 Mar 2000 10:47:54 -0500
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id KAA17198
	for tiff-outgoing; Mon, 13 Mar 2000 10:47:53 -0500
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from mail.rdc2.on.home.com (ha1.rdc2.on.home.com [24.9.0.15])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id KAA17195
	for <tiff@olympiakos.com>; Mon, 13 Mar 2000 10:47:51 -0500
Received: from home.com ([24.68.90.78]) by mail.rdc2.on.home.com
          (InterMail v4.01.01.07 201-229-111-110) with ESMTP
          id <20000313154731.XIOF29663.mail.rdc2.on.home.com@home.com>;
          Mon, 13 Mar 2000 07:47:31 -0800
Message-ID: <38CCC6FE.E78E3408@home.com>
Date: Mon, 13 Mar 2000 05:46:22 -0500
From: Frank Warmerdam <warmerda@home.com>
X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Cameron <cameron@petris.com>
CC: "tiff@olympiakos.com" <tiff@olympiakos.com>
Subject: Re: TIFF image file size
References: <38CCF70F.FB9FACA5@petris.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@olympiakos.com

Bruce Cameron wrote:
> 
> A colleague has the following error when animage processing program
> [OrthoBase] finishes and writes a TIFF image file --
> 
>                 Error writing data for field "BitsPerSample"
> 
> Now this is a very large file [over 3 Gbytes], and OrthoBase says
> it is because
> 
> "The TIFF header limits size to 32 bits (2Gig) (pixels or bytes
> - I'd have to check) even if file system supports larger files."
> 
> I am not aware of a size limit, and even if it were the actual
> error makes no sense - the BitsPerSample tag is a UINT16 but
> actual values in that field should in no way get that big.
> 
> Comments on file size limits and the meaning of that error are
> solicited.

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
