Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-h.b-one.net (mx-h.one.com [91.198.169.55])
	by mail9.b-one.net (Postfix) with ESMTP id A6C1D400B7C
	for <info@awaresystems.be>; Mon, 10 May 2010 15:32:17 +0200 (CEST)
Received: by mx-h.b-one.net (Postfix, from userid 106)
	id 9B26A8A1C7F8; Mon, 10 May 2010 15:32:17 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-h.b-one.net (Postfix) with ESMTP id B4E0A8A1C7F8 for
 <info@awaresystems.be>; Mon, 10 May 2010 15:32:16 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 9607E1D46C9B1; Mon, 10 May 2010
 08:31:14 -0500 (EST)
Received: from mail.sidefx.com (mail.sidefx.com [38.99.137.163]) by
 lists.maptools.org (Postfix) with ESMTP id 15B031D18EA86 for
 <tiff@lists.maptools.org>; Mon, 10 May 2010 08:27:39 -0500 (EST)
Message-ID: <4BE809BE.3030500@sidefx.com>
Date: Mon, 10 May 2010 09:27:26 -0400
From: Edward Lam <edward@sidefx.com>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: "Simon R. Proud" <Srp@geo.ku.dk>
References: <4BE7EF95.9690.0040.1@geo.ku.dk>
In-Reply-To: <4BE7EF95.9690.0040.1@geo.ku.dk>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Increasing the number of files loadable through libtiff
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: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Hi Simon,

Things come to mind offhand:

- Are you careful to only read on strip at a time across all files? ie. 
Using the strip-oriented interface appropriately:
http://www.remotesensing.org/libtiff/libtiff.html#strips

- Make sure you're not holding onto memory longer than you need it.

- TIFFOpen() flags: Use "m" to disable memory mapping, and probably "C" 
to enable strip chopping. See 
http://www.remotesensing.org/libtiff/man/TIFFOpen.3tiff.html

- Examine the underlying cause of your error. Are you exceeding the 
maximum number of file handles allowed?

Regards,
-Edward

Simon R. Proud wrote:
> Hi all, some time ago I posted a thread about not being able to load
> large numbers of TIFFs using TiffOpen (
> http://www.asmail.be/msg0054686850.html ), for some reason I can't
> reply to that now. Anyway, I have now hit a similar problem again. I
> need to open a large number of TIFFs at once (totalling ~18Gb), but
> only have 16Gb of memory. Is there any way to overcome this and be
> able to open all files simultaneously? I've tried fiddling with the
> numerous TIFFOpen options ("rM", "rCm", "rcm" etc) but have had no
> luck.
> 
> I only need to read one scanline at a time (which for all files would
> total about 20Mb!), so don't see that memory for the entire file is
> required. Any ideas, assistance, etc? Apologies if this is a very
> basic query, I'm something of a novice programmer.
> 
> Thanks. Simon.
> 
> _______________________________________________ Tiff mailing list:
> Tiff@lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/tiff 
> http://www.remotesensing.org/libtiff/

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