Return-Path: <owner-tiff@olympiakos.com>
Received: from localhost (localhost [127.0.0.1])
	by at1895.spb.edu (8.9.3/8.9.3) with ESMTP id QAA02990
	for <dron@localhost>; Tue, 6 Feb 2001 16:59:51 +0300
Received: from eudoramail.com [209.185.123.45]
	by localhost with POP3 (fetchmail-5.6.0)
	for dron@localhost (single-drop); Tue, 06 Feb 2001 16:59:51 +0300 (MSK)
Received: from gate7.olympiakos.com ([207.176.88.85]) by shared1-mail.whowhere.com; Tue Feb  6 05:00:36 2001
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id HAA32477;
	Tue, 6 Feb 2001 07:48:54 -0500
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Tue, 6 Feb 2001 07:45:21 -0500
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id HAA32393
	for tiff-outgoing; Tue, 6 Feb 2001 07:45:20 -0500
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from sierra.seas.upenn.edu (root@sierra.seas.upenn.edu [158.130.64.180])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id HAA32390
	for <tiff@olympiakos.com>; Tue, 6 Feb 2001 07:45:18 -0500
Received: from odin (HRS0538.RESNET-STUDENT.UPENN.EDU [128.91.43.28])
	by sierra.seas.upenn.edu (8.9.3/8.9.3) with SMTP id HAA11007
	for <tiff@olympiakos.com>; Tue, 6 Feb 2001 07:45:16 -0500 (EST)
Message-Id: <200102061245.HAA11007@sierra.seas.upenn.edu>
From: "Elan Ruskin" <ruskine@seas.upenn.edu>
To: tiff@olympiakos.com
Date: Tue, 6 Feb 2001 07:44:48 -0500
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: redefining put method for TIFFRGBAImageGet()
X-mailer: Pegasus Mail for Win32 (v3.01d)
Sender: owner-tiff@olympiakos.com
Status: RO
Content-Length: 1642
Lines: 36

Sirs and Madams,

It says in the libtiff documentation that there's some way to override 
the put method used by TIFFRGBAImageGet with a function better 
suited to my local raster representation, but it's not particularly clear 
from either the documentation or the source how I should write this 
new put method. Could someone please shed light on the issue?

Because I'm doing DSP on these images, I need to turn the TIFF into 
an array of floats, one per pixel (grayscale), instead of the packed 
ABGRABGRABGR format that the library provides. I furthermore 
need the raster origin to be at the top left, in raster[0][0], rather than 
at the bottom left (which results in my images being vertically 
flipped). From the structure definition in tiffio.h it looks like I need to 
replace the TIFFRGBAImage->put with a function of type (void 
*)(TIFFRGBAImage *) but I don't know what needs to be in the put 
function. It takes a TIFFRGBAImage, but how does it work out from 
that where to put the raster data? Where does it get its input? What 
sort of input does it get?

At the moment my program works by using the default ...Get() to 
read in the default raster format, then I unpack and repack that to my 
specifications, but this is inefficient and I need good speed on this 
particular operation. Could anyone supply me with an example put 
method?

Thanks.
Elan Ruskin // PENN engineering 


---
    Elan Ruskin -- ruskine@seas.upenn.edu
http://www.stwing.upenn.edu/~ruskine
"The best measure of a person's worth is the depth of his 
commitment to the advancement and preservation of reason."
                                --Collabi

