Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas021.isp.belgacom.be (localhost [127.0.0.1])
        by inav009.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k52FdYjI020395
        for <joris.at.lebbeke@skynet.be>; Fri, 2 Jun 2006 17:39:35 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx012.isp.belgacom.be (inmx012.isp.belgacom.be [195.238.5.90])
        by inas021.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k52FdT6I019981
        for <joris.at.lebbeke@skynet.be>; Fri, 2 Jun 2006 17:39:33 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k52FdJ3s030795
        for <joris.at.lebbeke@skynet.be>; Fri, 2 Jun 2006 17:39:19 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k52FPPBg020043;
	Fri, 2 Jun 2006 11:26:07 -0400
Received: from scmze001.ssan.egs-seg.gc.ca (scmze001.ssan.egs-seg.gc.ca
	[205.194.19.85])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k52FPMhd020039
	for <tiff@lists.maptools.org>; Fri, 2 Jun 2006 11:25:22 -0400
Received: from bulwark1.ic.gc.ca ([192.197.178.1])
	by scmze001.ssan.egs-seg.gc.ca with ESMTP; 02 Jun 2006 11:22:22 -0400
Received: from msg-gate2.ic.gc.ca ([142.53.11.42]) by bulwark1.ic.gc.ca
	via smtpd (for scmze001.ssan.egs-seg.gc.ca [205.194.19.85]) with ESMTP;
	Fri, 2 Jun 2006 11:22:22 -0400
Received: from parapet11.ic.gc.ca (parapet11.ic.gc.ca [142.53.11.253])
	by msg-gate2.ic.gc.ca (Switch-3.1.8/Switch-3.1.7) with ESMTP id
	k52FML7W017475
	for <tiff@lists.maptools.org>; Fri, 2 Jun 2006 11:22:22 -0400 (EDT)
Received: from msg-con2.icent.ic.gc.ca by parapet11.ic.gc.ca
	via smtpd (for msg-gate2.ic.gc.ca [142.53.11.42]) with ESMTP;
	Fri, 2 Jun 2006 11:22:21 -0400
Received: from msg-con1.icent.ic.gc.ca ([142.53.28.148]) by
	msg-con2.icent.ic.gc.ca with Microsoft SMTPSVC(6.0.3790.211); 
	Fri, 2 Jun 2006 11:22:46 -0400
Received: from msg-mb2.icent.ic.gc.ca ([142.53.28.151]) by
	msg-con1.icent.ic.gc.ca with Microsoft SMTPSVC(6.0.3790.211); 
	Fri, 2 Jun 2006 11:22:38 -0400
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Date: Fri, 2 Jun 2006 11:22:21 -0400
Message-ID: <F78E6BBD22A6FC4489EBE25045407908036FA642@msg-mb2.icent.ic.gc.ca>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: TIFFWriteRawStrip with multi-strip?
Thread-Index: AcaGWFeZsWMnZ4TNRU2S4RkEL4p71Q==
From: "Pallek, Bernie: #CIPO - OPIC" <Pallek.Bernie@ic.gc.ca>
To: <tiff@lists.maptools.org>
X-OriginalArrivalTime: 02 Jun 2006 15:22:38.0647 (UTC)
	FILETIME=[62066C70:01C68658]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	k52FPMhd020039
Subject: [Tiff] TIFFWriteRawStrip with multi-strip?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.0000174d
X-MSP-STORE: Fri, 02 Jun 2006 17:39:40 +0200
Status:   

I have already-compressed (COMPRESSION_CCITT_T6-type) data which I'd like to bind to a new TIFF file.  So, I'm setting rows-per-strip equal to the image length (height), and I'm using something like:

checkCount = TIFFWriteRawStrip(someTifStructInstance, 0, someBuffer, theSizeOfThatBuffer);

and this works just fine.

However, I'd like to now use an arbitrary value for rows-per-strip.  But this means I need to find the byte offsets within 'someBuffer' so I can call TIFFWriteRawStrip repeatedly, incrementing the strip number.  The crux?  Since the data is compressed, how in the crap will I know where each strip's data begins within 'someBuffer'?  Each strip is going to vary in size.

Can anyone think of a clever way to work around this?  Well, it doesn't even /need/ to be clever, as long as it's reliable.

(Of course, I could decompress the data into a temp buffer, then use a loop of TIFFWriteEncodedStrip, but the decoding and re-encoding is the very thing I'm trying to avoid).  ;-)


Bernie Pallek
CIPO-ISB (Development)
Pallek.Bernie@ic.gc.ca / 819-953-8380

"Is this part... supposed to be smashed like this?" -- Stormy (Sealab 2021 -- "Frozen Dinner")

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
