Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx009.isp.belgacom.be (inmx009.isp.belgacom.be [195.238.3.146])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id iB7H510a017869
        for <joris.at.lebbeke@skynet.be>; Tue, 7 Dec 2004 18:05:01 +0100
        (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 inmx009.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id iB7H4uWt007391
        for <joris.at.lebbeke@skynet.be>; Tue, 7 Dec 2004 18:04:57 +0100
        (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 A5A904E12F3; Tue,  7 Dec 2004 12:04:43 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by xserve.flids.com (Postfix) with ESMTP id 7D9F04E12CC
	for <tiff@remotesensing.org>; Tue,  7 Dec 2004 12:04:40 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	iB7H4cjt028384; Tue, 7 Dec 2004 11:04:38 -0600 (CST)
Date: Tue, 7 Dec 2004 11:04:38 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@blade.simplesystems.org
To: Dan Field <dof@llgc.org.uk>
Subject: Re: [Tiff] Fetching pixel data from 4bit tiff
In-Reply-To: <41B5EC62.1020407@llgc.org.uk>
Message-ID: <Pine.SOC.4.60.0412071101420.4000@blade.simplesystems.org>
References: <41B5A137.1030103@llgc.org.uk>
	<Pine.SOC.4.60.0412070944330.4000@blade.simplesystems.org>
	<41B5EC62.1020407@llgc.org.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
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: 5fdfe6eb6974128a00b604ad14c37793

On Tue, 7 Dec 2004, Dan Field wrote:

>> You should use TIFFReadScanline() to read each scanline into memory you 
>> have allocated.  There is one scanline per row.  The scan-line is returned 
>> packed according to the TIFF specification, with two samples per byte.  It 
>> is a small matter of masking and shifting to obtain each nibble.  The only 
>> tricky case is to properly handle an image with an odd number of columns.
>
> This appears to work with rows though. I need to sample from columns aswell 
> as rows. Is there any way to take a vertical scanline with this function?

Your TIFF image is organized as rows.  In order to obtain a column, 
you will need to request all of the rows, and select the samples from 
each row which correspond to the column.  Most image processing 
package extract the TIFF image into their own representation (often a 
simple array) which is much easier to access.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
