Return-Path: <owner-tiff@olympiakos.com>
Received: from nataly.at1895.spb.edu (localhost [127.0.0.1])
	by at1895.spb.edu (8.12.4/8.12.4/Debian-4) with ESMTP id g7G70AdF006295
	for <dron@at1895.spb.edu>; Fri, 16 Aug 2002 11:00:10 +0400
Received: from olympiakos.com (uucp@localhost)
	by nataly.at1895.spb.edu (8.12.4/8.12.4/Debian-4) with UUCP id g7G70AS8006293
	for dron@at1895.spb.edu; Fri, 16 Aug 2002 11:00:10 +0400
Received: from knot.pu.ru (knot.pu.ru [193.124.85.214] (may be forged))
	by wg.pu.ru (8.9.1a/8.9.1) with ESMTP id GAA25887
	for <dron@at1895.spb.edu>; Fri, 16 Aug 2002 06:50:25 GMT
Received: from gate7.olympiakos.com (sdsl-64-32-199-150.dsl.iad.megapath.net [64.32.199.150])
	by knot.pu.ru (8.9.3/8.9.0) with ESMTP id KAA69979
	for <dron@at1895.spb.edu>; Fri, 16 Aug 2002 10:50:23 +0400 (MSD)
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id CAA22378;
	Fri, 16 Aug 2002 02:46:59 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Fri, 16 Aug 2002 02:40:36 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id CAA22286
	for tiff-outgoing; Fri, 16 Aug 2002 02:40:35 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id CAA22283
	for <tiff@olympiakos.com>; Fri, 16 Aug 2002 02:40:34 -0400
Received: from fwd02.sul.t-online.de 
	by mailout03.sul.t-online.com with smtp 
	id 17famZ-00040H-01; Fri, 16 Aug 2002 08:40:27 +0200
Received: from p3E9E1652.dip.t-dialin.net (027122869-0001@[62.158.22.82]) by fwd02.sul.t-online.com
	with smtp id 17famJ-0kyt4iC; Fri, 16 Aug 2002 08:40:11 +0200
Date: 16 Aug 2002 8:39:41 +0100
From: Andreas_Kleinert@t-online.de (Andreas R. Kleinert)
Subject: Re: How to read number of pages for multipage TIFF
To: eugene@mailinv.com
In-Reply-To: <006801c23731$feb93130$3619a8c0@toronto.local>
Message-ID: <933.993T2059T5194641info@ar-kleinert.de>
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Cc: tiff@olympiakos.com
X-Mailer: THOR 2.6a (Amiga;TCP/IP)
X-Sender: 027122869-0001@t-dialin.net
Sender: owner-tiff@olympiakos.com
Precedence: bulk
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 1064
Lines: 31

>Could you please advise the method to retreive the number of pages from
>multipage TIFF frile.. I know this is a tag 297(129H) ...but how to read it?

 Two possible answers, depending on what you meant:

 1. The same way as any other tag.
 2. The same way as in tif_dir.c - which has functions for this - or by
    scanning the file on your own, following the offset to the first
    directory as given in the header.

 For 2. the answer is:

   tif = TIFFOpen(name, "rb");
   pages = TIFFNumberOfDirectories(tif);
   TIFFSetDirectory(tif, n); // where n is 0..(pages-1)
   TIFFReadDirectory(tif);
   //...
   TIFFGetField(...);

 For 1. the point is:

   TIFFGetField() or custom code.

--
Andreas_Kleinert@t-online.de  | http://www.ar-kleinert.de             |
Freelance Consultant & Writer | Software Engineering                  |
 *** PerSuaSiVe SoftWorX ***  | x86 Win/Linux, 68k/PPC Amiga and more |


To subscribe or unsubscribe email tiff-request@olympiakos.com with subscribe
or unsubscribe in the email body.  Libtiff home page: http://www.libtiff.org

