Return-Path: <tiff-bounces@remotesensing.org>
Received: from infbav005.isp.belgacom.be (infbav005.isp.belgacom.be [195.238.3.186])
        by mailst034.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i9IDPQTt021189
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:25:26 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inav010.isp.belgacom.be (inav010.isp.belgacom.be [195.238.3.53])
        by infbav005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-FALLBACK-2.32) with ESMTP id i9IDOl5t017074
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:24:47 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inas013.isp.belgacom.be (localhost [127.0.0.1])
        by inav010.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id i9IDObqd019393
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:24:37 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inmx008.isp.belgacom.be (inmx008.isp.belgacom.be [195.238.3.88])
        by inas013.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id i9IDO4ZL005028
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:24:26 +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 inmx008.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i9IDNWQ3021564
        for <joris.at.lebbeke@skynet.be>; Mon, 18 Oct 2004 15:23:34 +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 C031B3CA2B1; Mon, 18 Oct 2004 09:23:06 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.206])
	by xserve.flids.com (Postfix) with ESMTP id CD21D3CA28B
	for <tiff@remotesensing.org>; Mon, 18 Oct 2004 09:23:00 -0400 (EDT)
Received: by mproxy.gmail.com with SMTP id 73so188374rnk
	for <tiff@remotesensing.org>; Mon, 18 Oct 2004 06:22:56 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
	b=rz4h6HhoDX/f/LIPRxltQBLKpxVD0RBVyppi5eqlWi7Icy5bAncZc9Q488TAMOKipKUAw5Vzl8fhTa5/y57lchrrflFPcvxU/3cMGbB613jTjhK+k+5hlU37stjo6NpdwC6zRRMYqbprKFRzxIRYCJnXKKVn39F3iX2ZsJlUMYM
Received: by 10.38.181.77 with SMTP id d77mr1402713rnf;
	Mon, 18 Oct 2004 06:22:56 -0700 (PDT)
Received: by 10.38.86.41 with HTTP; Mon, 18 Oct 2004 06:22:56 -0700 (PDT)
Message-ID: <b353037041018062252614b7a@mail.gmail.com>
Date: Mon, 18 Oct 2004 18:52:56 +0530
From: Sachin Garg <schngrg@gmail.com>
To: tiff@remotesensing.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [Tiff] How can I manually set the StripOffsets and StripCounts
	fields?
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Sachin Garg <schngrg@gmail.com>
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: 12b7d9df398c9d5882740b0af0f05f9b

#. What i am trying to do is...

I am reading a tiff file using libTiff and i want to write all the
tags/directories in that image to a file (again using libTiff) without
writing any image data.

( So that I can later read that tags file (using libtiff) to recreate
a Tiff image with similar characteristics )

(I am using code from the tiffcp tool)

#. The problem I am facing is...

The TIFFReadDirectory function checks if the directory it is reading
has a valid StripOffsets and StripByteCounts fields (or the
corresponding tiles fields for tiled images)

While writting the tags file, i had not written any image data, so
there are no such fields in the file and thus the ReadDir function
fails.

#. 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?

(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?)

This query is related to an older post of mine which you can find at 
  http://www.asmail.be/msg0055222442.html

-- 
Sachin Garg [India]
http://www.geocities.com/schngrg 
http://sachingarg.go.to
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
