Return-Path: owner-tiff@olympiakos.com
Return-Path: <owner-tiff@olympiakos.com>
Received: from localhost (localhost [127.0.0.1])
	by at1895.spb.edu (8.12.0.Beta7/8.12.0.Beta7) with ESMTP id f43AbOEu007679
	for <dron@localhost>; Thu, 3 May 2001 14:42:05 +0400
Received: from eudoramail.com [209.185.123.45]
	by localhost with POP3 (fetchmail-5.8.1)
	for dron@localhost (single-drop); Thu, 03 May 2001 14:42:05 +0400 (MSD)
Received: from gate7.olympiakos.com ([207.176.88.85]) by shared1-mail.whowhere.com; Wed May  2 06:52:53 2001
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id JAA03057;
	Wed, 2 May 2001 09:36:21 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Wed, 2 May 2001 09:34:47 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id JAA02943
	for tiff-outgoing; Wed, 2 May 2001 09:34:47 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from spitfire.velocet.net (spitfire.velocet.net [209.167.225.66])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id JAA02940
	for <tiff@olympiakos.com>; Wed, 2 May 2001 09:34:45 -0400
Received: from pobox.com (H14.C198.tor.velocet.net [216.138.198.14])
	by spitfire.velocet.net (Postfix) with ESMTP
	id 54F5E19A16F; Wed,  2 May 2001 09:34:40 -0400 (EDT)
Message-ID: <3AF00C06.B51C4F39@pobox.com>
Date: Wed, 02 May 2001 09:30:46 -0400
From: Frank Warmerdam <warmerdam@pobox.com>
Reply-To: warmerdam@pobox.com
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Wolfram Bettermann <wolfram.bettermann@usa.net>
Cc: TIFF Mailing List <tiff@olympiakos.com>
Subject: Re: Pixel Raster (DIB) into TIFF G4
References: <20010502124549.19223.qmail@nw128.netaddress.usa.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@olympiakos.com
Status: RO
Content-Length: 1416
Lines: 29

Wolfram Bettermann wrote:
> I have tried to convert this packed raster into a TIFF G4 using
> TIFFWriteEncodedSTrip, but do get an error message that the ImageLength is not
> set (altough I did with TIFFSetField) but was not sure how to tell libtiff
> where this raster buffer resides.

Wolfram, 

You will likely have to provide the relvent section of code for us to see
to answer this.  
 
> My question is, do I first have to unpack the bytes that 1 pixel (1bit) is in
> ne byte (so width is now really one pixel per byte) and then pass this buffer
> to libtiff using  WriteEncodedStrip? And if yes, how do I pass this raster
> buffer to the libtiff?

No, if you setup output with BITSPERSAMPLE set to 1, you will want to 
keep your bitmap packed eight pixels per byte.  However, the 32bit alignment
of scanlines will be a problem.  I believe that the buffer passed to 
TIFFWriteEncodedStrip() expects the buffer to be tightly packed (no extra
space for alignment between scanlines), so if you width isn't a multiple
of 32 you will have to repack the bitmap before passing to TIFFWriteEncodedStrip.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

