Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas001.isp.belgacom.be (localhost [127.0.0.1])
        by inav025.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k12FmFvl003847
        for <joris.at.lebbeke@skynet.be>; Thu, 2 Feb 2006 16:48:15 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx005.isp.belgacom.be (inmx005.isp.belgacom.be [195.238.5.148])
        by inas001.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k12Fm6Dj007780
        for <joris.at.lebbeke@skynet.be>; Thu, 2 Feb 2006 16:48:07 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k12Fm0C9016583
        for <joris.at.lebbeke@skynet.be>; Thu, 2 Feb 2006 16:48:00 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
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 k12FSJRa025755;
	Thu, 2 Feb 2006 10:28:51 -0500
Received: from mail.sidefx.com (tor149-99-58-193.dedicated.sprintdsl.ca
	[149.99.58.193])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k12FSHmq025751
	for <tiff@lists.maptools.org>; Thu, 2 Feb 2006 10:28:17 -0500
Message-ID: <43E22549.3080807@sidefx.com>
Date: Thu, 02 Feb 2006 10:29:13 -0500
From: Edward Lam <edward@sidefx.com>
User-Agent: Thunderbird 1.4 (Windows/20050908)
MIME-Version: 1.0
To: "Pallek, Bernie: #CIPO - OPIC" <Pallek.Bernie@ic.gc.ca>
Subject: Re: [Tiff] Fastest method to load tiff files?
References: <F78E6BBD22A6FC4489EBE25045407908036FA54D@msg-mb2.icent.ic.gc.ca>
In-Reply-To: <F78E6BBD22A6FC4489EBE25045407908036FA54D@msg-mb2.icent.ic.gc.ca>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: 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.0000122b
X-MSP-STORE: Thu, 02 Feb 2006 16:48:25 +0100
Status:   

Hi Bernie,

Thanks for the tips. I'll keep those in mind. I'm primarily dealing with either 
stripped or tiled images. The images range from 8 to 32 bits per sample (ie. 
32-bit floats). I was hoping someone would have gone down this route and knew 
which interface one should be using. Currently, we're using the 
TIFFReadEncodedStrip() and TIFFReadEncodedTile() interface. If the image has 
interleaved data, we de-interleave it ourselves.

Thanks,
-Edward

Pallek, Bernie: #CIPO - OPIC wrote:
> The answer depends a little on what kind of TIFFs you'll be reading.  If black and white, you'll find a nice example here:
> 
> http://www.ibm.com/developerworks/linux/library/l-libtiff
> 
> General tips:
> - write several versions of your routines, using different strategies/ideas
> - profile your code, and see where your bottlenecks are; if your code is slow, you can improve it -- if they are in libtiff itself, you're done
> - always try to pre-compute the final memory requirements so you can allocate all at once (superfluous memory management can waste time)
> - if you know certain things about types of images, and those types of images will always be used, you can optimize for them, although that would generally require tuning of the actual library, not the code that uses it (for instance, if it's a given that the images are always equal to or small than a certain size, you can allocate one buffer for that (maximum) size, and keep re-using that buffer, instead of allocating and de-allocating for each image in a batch -- realize, though, that the gains are likely to be marginal)
> - if you really need that extra little bit of speed, you might be able to recompile libtiff with tweaked build settings for your target platform (consider things like byte-alignment, etc)
> 
>> -----Original Message-----
>> From: tiff-bounces@lists.maptools.org
>> [mailto:tiff-bounces@lists.maptools.org]On Behalf Of Edward Lam
>> Sent: Thursday, February 2, 2006 9:34 AM
>> To: tiff@lists.maptools.org
>> Subject: [Tiff] Fastest method to load tiff files?
>>
>>
>> Hi,
>>
>> What is the fastest way to read tiff files using libtiff?
>>
>> Thanks,
>> -Edward
>> _______________________________________________
>> 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/
