Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx006.isp.belgacom.be (inmx006.isp.belgacom.be [195.238.2.106])
        by mailst006.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i6RC58Yh001605
        for <joris.at.lebbeke@skynet.be>; Tue, 27 Jul 2004 14:05:08 +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 inmx006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i6RC53kb028009
        for <joris.at.lebbeke@skynet.be>; Tue, 27 Jul 2004 14:05: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 0F0CA16DE9A; Tue, 27 Jul 2004 08:04:46 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from lucius.provo.novell.com (lucius.provo.novell.com
	[137.65.81.172])
	by xserve.flids.com (Postfix) with ESMTP id 666EC16DE77
	for <tiff@remotesensing.org>; Tue, 27 Jul 2004 08:04:43 -0400 (EDT)
Received: from INET-PRV1-MTA by lucius.provo.novell.com
	with Novell_GroupWise; Tue, 27 Jul 2004 06:04:42 -0600
Message-Id: <s105f07a.073@lucius.provo.novell.com>
X-Mailer: Novell GroupWise Internet Agent 6.5.2 Beta
Date: Tue, 27 Jul 2004 06:04:24 -0600
From: "Sanjay Gupta" <GSanjay@novell.com>
To: <warmerdam@pobox.com>, <tiff@remotesensing.org>
Subject: Re: [Tiff] Saving multiple images to a tiff file...
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Cc: 
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: 1d4248d4ba7b9ddb1271cd3580a341e3

Hi Frank,
Thanx for your help. Now i am able to get a valid tif file, but still
not able to get multiple images in single file. 
Now when the program is calling TIFFWriteDirectory (), the control
goes to TIFFLinkDirectory() and it fails there, giving me an error
"TIFFLinkDirectory: Error Fetching directory count."
Do i need to set something else also. 
I have modified my file like this:-

for (k = 0; k < frameCount; k++) {
                if (k > 0){
		TIFFCreateDirectory (tiff);
		TIFFSetField (tiff, TIFFTAG_SUBFILETYPE,
FILETYPE_PAGE);
	}
                ...
}

Now because of the above error, i get a file which contains only one
image,
as opposed to expected multiple images.

TIA for your help.

Regards,
Sanjay

>>> Frank Warmerdam <warmerdam@pobox.com> 7/26/2004 7:33:05 PM >>>

Sanjay,

Reviewing some of my multi-page implementations, it appears you should
be
calling TIFFCreateDirectory() for each new directory you want to
create
with the exception of the first (it is implicitly created when the
file
is created).


  for (k = 0; k < frameCount; k++) {
        if( k > 0 )
            TIFFCreateDirectory( tiff );

        data = image->frameDimensionList [j].frames [k];
...
  				
  	TIFFWriteDirectory (tiff);
  }
-- 
---------------------------------------+--------------------------------------
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
