Return-Path: <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 j3QF7bNv031404
        for <joris.at.lebbeke@skynet.be>; Tue, 26 Apr 2005 17:07:38 +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 83EB1227B736; Tue, 26 Apr 2005 11:07:16 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176])
	by xserve.flids.com (Postfix) with ESMTP id 6704F227B712
	for <tiff@remotesensing.org>; Tue, 26 Apr 2005 11:07:14 -0400 (EDT)
Received: from imp4-q.free.fr (imp4-q.free.fr [212.27.42.4])
	by postfix4-2.free.fr (Postfix) with ESMTP id 37E9B319239
	for <tiff@remotesensing.org>; Tue, 26 Apr 2005 17:07:13 +0200 (CEST)
Received: by imp4-q.free.fr (Postfix, from userid 33)
	id 186D432E72; Tue, 26 Apr 2005 17:07:13 +0200 (MEST)
Received: from mirail-2-82-224-13-112.fbx.proxad.net
	(mirail-2-82-224-13-112.fbx.proxad.net [82.224.13.112]) 
	by imp4-q.free.fr (IMP) with HTTP 
	for <gandhy@imap.free.fr>; Tue, 26 Apr 2005 17:07:13 +0200
Message-ID: <1114528033.426e592103ab0@imp4-q.free.fr>
Date: Tue, 26 Apr 2005 17:07:13 +0200
From: GUENDE <gandhy@free.fr>
To: tiff@remotesensing.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.2.5
X-Originating-IP: 82.224.13.112
Subject: [Tiff] Floating points to TIFF
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: 000000000023ceae.0000014a
X-MSP-STORE: Tue, 26 Apr 2005 17:07:47 +0200
Status:   

Hi !

I'm developping a soft to convert my binary raw file of floating points to TIFF
format. I'm using libtiff with these tags:

TIFFSetField(ficout, TIFFTAG_IMAGEWIDTH,width	);
TIFFSetField(ficout, TIFFTAG_IMAGELENGTH,length	);
TIFFSetField(ficout, TIFFTAG_BITSPERSAMPLE,32 ); //floating points=4Bytes
TIFFSetField(ficout, TIFFTAG_PHOTOMETRIC,34892	);
TIFFSetField(ficout, TIFFTAG_ROWSPERSTRIP,1);
TIFFSetField(ficout, TIFFTAG_SAMPLEFORMAT,SAMPLEFORMAT_IEEEFP	);
TIFFSetField(ficout, TIFFTAG_PLANARCONFIG,1	);
TIFFSetField(ficout, TIFFTAG_SAMPLESPERPIXEL,1	);

So I'm using 1band images with floating points (4Bytes)
My program writes the right amount of rows (1per strip), but i get 1byte data in
output instead of 4bytes !!!

I think i missed something...

I'm saving data like this:
raster=my raw data, filout=my output if file
// Write the information to the file
for (i=0; i<length; i++)
{
	for (j=0; j<width; j++)
		raster2[j]=raster[i*width+j];
		TIFFWriteRawStrip(filout, i, raster2, width);
}
TIFFClose(filout);


So:
My test data is a 4920*5116 image of float (4Bytes/pixel)
My output data is a 4920*5116 image of Byte (1Byte/pixel)

If someone could help me...

Thanks,
Bastien
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
