Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx010.isp.belgacom.be (inmx010.isp.belgacom.be [195.238.2.73])
        by mailst006.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i7CFGP3u002110
        for <joris.at.lebbeke@skynet.be>; Thu, 12 Aug 2004 17:16:25 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx010.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i7CFGCte022879
        for <joris.at.lebbeke@skynet.be>; Thu, 12 Aug 2004 17:16:13 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id B768B1D1021; Thu, 12 Aug 2004 11:15:57 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from through.acv.apexcovantage.com (through.apexcovantage.com
	[65.166.131.3])
	by xserve.flids.com (Postfix) with ESMTP id 9D20F1D0FFE
	for <tiff@remotesensing.org>; Thu, 12 Aug 2004 11:15:55 -0400 (EDT)
Received: from apex.acv.apexcovantage.com (apex.acv.apexcovantage.com
	[192.168.0.1]) by through.acv.apexcovantage.com
	(8.12.8/8.12.8/apexcovantage-gateway-1.0) with ESMTP id
	i7CFFluk004008; Thu, 12 Aug 2004 11:15:47 -0400
Received: from soup.acv.apexcovantage.com (soup.acv.apexcovantage.com
	[192.168.0.5]) by apex.acv.apexcovantage.com
	(8.12.8/8.12.8/ads-apexcovantage-hub-1.1.b1) with ESMTP id
	i7CFFkMG019326; Thu, 12 Aug 2004 11:15:46 -0400
Received: from soup.acv.apexcovantage.com (localhost [127.0.0.1])
	by soup.acv.apexcovantage.com (8.13.1/8.13.1/Debian-2) with ESMTP id
	i7CFFknj004700; Thu, 12 Aug 2004 11:15:46 -0400
Received: (from ejb@localhost)
	by soup.acv.apexcovantage.com (8.13.1/8.13.1/Debian-2) id
	i7CFFkHC004696; Thu, 12 Aug 2004 11:15:46 -0400
Date: Thu, 12 Aug 2004 11:15:46 -0400
From: Jay Berkenbilt <ejb@ql.org>
To: joris.at.lebbeke@skynet.be
In-reply-to: <001501c4807d$d0a2bd10$1709f151@dfgrrxsknr4e>
	(joris.at.lebbeke@skynet.be)
Subject: Re: [Tiff] From bmp to Tiff
References: <4977.192.168.157.65.1092266262.squirrel@192.168.157.90>
	<Pine.SOC.4.60.0408120930290.28066@blade.simplesystems.org>
	<001501c4807d$d0a2bd10$1709f151@dfgrrxsknr4e>
Message-ID: <20040812111543.0169458048.qww314159@soup.acv.apexcovantage.com>
X-Apex-MailScanner-Information: Scanned by Apex with MailScanner
X-Apex-MailScanner: Found to be clean
X-MailScanner-From: ejb@apexcovantage.com
Cc: tiff@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: d8f983a4e0c8002af15b7f62713718d0


I wrote some example code that includes an area-averaging algorithm
for the purposes of demonstrating it to a potential customer.  The
purpose of my algorithm was to be able to downsample an image reading
as little of the image into memory at a time as was possible.  I came
up with the algorithm myself not realizing it was a standard approach
and thought about it in terms of pouring paint from one set of
containers into another set of containers.  My code includes copious
comments describing how to think about the algorithm.  The entire
source is about 350 lines including comments and blank lines, about
200 lines ignoring them.  There is also a trivial example program that
scales binary pgm or ppm files with it.  It would be easy to use this
program to scale tiffs.  In fact, I originally wrote it for that
purpose.

I'd be happy to share this code with any individual who wants it, post
it to the list, or put it somewhere and post a link.  Let me know if
you're interested.

-- 
Jay Berkenbilt <ejb@ql.org>
http://www.ql.org/q/
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
