Return-Path: <tiff-bounces@remotesensing.org>
Received: from inav013.isp.belgacom.be (inav013.isp.belgacom.be [195.238.2.245])
        by mailst034.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i9H6x9KP030360
        for <joris.at.lebbeke@skynet.be>; Sun, 17 Oct 2004 08:59:09 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inas003.isp.belgacom.be (localhost [127.0.0.1])
        by inav013.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id i9H6wnKb009332
        for <joris.at.lebbeke@skynet.be>; Sun, 17 Oct 2004 08:58:49 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inmx006.isp.belgacom.be (inmx006.isp.belgacom.be [195.238.2.106])
        by inas003.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id i9H6wdfH031038
        for <joris.at.lebbeke@skynet.be>; Sun, 17 Oct 2004 08:58:41 +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 inmx006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i9H6wTJ5002356
        for <joris.at.lebbeke@skynet.be>; Sun, 17 Oct 2004 08:58:30 +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 9A2FE3C41AF; Sun, 17 Oct 2004 02:58:13 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from ahk.pu.ru (ahk.pu.ru [193.124.85.198])
	by xserve.flids.com (Postfix) with ESMTP id 852623C419F
	for <tiff@remotesensing.org>; Sun, 17 Oct 2004 02:58:11 -0400 (EDT)
Received: from wg.pu.ru (wg.pu.ru [193.124.85.219])
	by ahk.pu.ru (8.12.11/8.12.9) with ESMTP id i9H6w9LB047903
	for <tiff@remotesensing.org>; Sun, 17 Oct 2004 10:58:10 +0400 (MSD)
	(envelope-from dron@ak4719.spb.edu)
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id GAA09475
	for tiff@remotesensing.org; Sun, 17 Oct 2004 06:58:09 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.12.11/8.12.11/Debian-5) with ESMTP id
	i9H6Zuwt007684
	for <tiff@remotesensing.org>; Sun, 17 Oct 2004 10:35:56 +0400
Received: (from dron@localhost)
	by ak4719.spb.edu (8.12.11/8.12.11/Debian-5) id i9H6ZuHO007681
	for tiff@remotesensing.org; Sun, 17 Oct 2004 10:35:56 +0400
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Sun, 17 Oct 2004 10:35:56 +0400
To: tiff@remotesensing.org
Subject: Re: [Tiff] Any way to pass a byte based buffer in calling
	TIFFReadRGBAImageOriented?
Message-ID: <20041017063556.GB5925@ak4719.spb.edu>
Mail-Followup-To: tiff@remotesensing.org
References: <416D5124.4050704@houston.oilfield.slb.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <416D5124.4050704@houston.oilfield.slb.com>
X-GnuPG-Key: http://www.srces.spb.org/dron/export.home.key
X-Face: "t+se9s~+y~[XUH]L|pmeO3Pt/Q@DNv**S, d@_1-C=}/,
	c%<3Qp]eu!ok<"2lYJm$!9qVcg F?7o*L; |$`6|Q|>Rt-cU%2_y@6tQ|`!Li}TsvZvEKx;
	>fuY=fc(=sX^`7Wmw8%SsR`AvM$a; 0U/eN\ P?B\FTyqD, 0np$U2!*'z_4D,
	VPlFf?bN0&zYf"zF0s!7Tl7?$we)xD0@lL>[h|8bhys0i.g|zLnu@C
	Ti@d]i=[!:j1CB\5/TF[m]`lfHfaqSN[0qn@T3zeosV/[LAss{@p_?],x*j8P_9t[}uHD^X-;
	j~\M! gyTly;fj`}&Y~i{<#bN.#QmkE}#T`dxP.I1\.)_MEN{@#W
User-Agent: Mutt/1.5.6+20040722i
X-Virus-Scanned: clamd / ClamAV version 0.75-1, clamav-milter version 0.75c
	on ak4719
X-Virus-Status: Clean
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: cb41ef5909308a580fe312ff88450b2a

On Wed, Oct 13, 2004 at 11:00:36AM -0500, Howard Xu wrote:
> I am trying to use the latest libtiff library. But I have found that
> APIs in reading TIFF files are requiring only a unit32 buffer
> (tifBuffer) in the following call:
> 
>      TIFFReadRGBAImageOriented(tifFile,
>                                                           width, height,
>                                                           tifBuffer,
>                                                           
> ORIENTATION_TOPLEFT, 0)
> 
> If I knew that the TIFF file to be loaded is a Black/White 1
> sample/bit data file, is there any way I can pass a byte (unsigned
> char) buffer to the API so that the memory usage will be more
> efficient?

TIFFRGBAImage is a high level API. These calls always operate in the
RGBA space and your 1-bit image will be converted in 8-bit quadruplet.
To get access to the actual data contained in your image you should use
TIFFReadScanline/TIFFReadEncodedStrip/TIFFReadTile functions.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
