Return-Path: <tiff-bounces@remotesensing.org>
Received: from inav005.isp.belgacom.be (inav005.isp.belgacom.be [195.238.2.77])
        by mailst034.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i9IDZdp0026535
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:35:42 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inas011.isp.belgacom.be (localhost [127.0.0.1])
        by inav005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id i9IDZOvC001247
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:35:24 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inmx007.isp.belgacom.be (inmx007.isp.belgacom.be [195.238.3.89])
        by inas011.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id i9IDZDgv030866
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:35:19 +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 inmx007.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i9IDZ4Wl023691
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:35:04 +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 7ECBD3CA3B6; Mon, 18 Oct 2004 09:34:22 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from hornet.wiznet.ca (hornet.wiznet.ca [216.138.223.229])
	by xserve.flids.com (Postfix) with ESMTP id 3ED4F3CA393
	for <tiff@remotesensing.org>; Mon, 18 Oct 2004 09:34:20 -0400 (EDT)
Received: from [192.168.2.6] (H156.C195.tor.velocet.net [216.138.195.156])
	by hornet.wiznet.ca (Postfix) with ESMTP
	id BD321327258; Mon, 18 Oct 2004 09:30:50 -0400 (EDT)
Message-ID: <4173C5CA.3020309@pobox.com>
Date: Mon, 18 Oct 2004 09:31:54 -0400
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Sachin Garg <schngrg@gmail.com>
Subject: Re: [Tiff] Fwd: How can I manually set the StripOffsets and
	StripCounts fields?
References: <b353037041018062252614b7a@mail.gmail.com>
	<b3530370410180625d27c431@mail.gmail.com>
In-Reply-To: <b3530370410180625d27c431@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
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: 470c5dc9ed459c6fc11eccc7b74db61e

Sachin Garg wrote:

> #. A possible solution I can think of is to create dummy Offsets and
> ByteCounts fields (with values 0) in the tiff directory when I am
> writting only the tags. This way the ReadDir routine wont fail when I
> read in the file.
> 
> I couldnt figure-out how to create these dummy tags. I tried
> TIFFGrowStrips but I guess thatz not what I need to do. How can I
> create these dummy tags?

Sachin,

I believe the TIFFWriteCheck() function will ensure that a zeroed
set of image offset/size tags gets written.  I do this routinely in
my software.  The TIFFWriteCheck() function isn't documented in the man
pages, and is mainly intended for internal use.   I call it like this:

     TIFFWriteCheck( hTIFF, TIFFIsTiled(hTIFF), "GTiffDataset::Crystalize");

> (And later when I will be writting the actual image data using other
> tiffcp's routines like writeBufferToContigStrips etc... I hope the
> dummy tags will get overwritten with correct values, or will I have to
> do something else for that?)

Yes, this should work fine.

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

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