Return-Path: <tiff-bounces@lists.maptools.org>
Received: from infbas002.isp.belgacom.be (localhost [127.0.0.1])
        by inav006.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k9QIjKiQ028978
        for <joris.at.lebbeke@skynet.be>; Thu, 26 Oct 2006 20:45:23 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inas018.isp.belgacom.be (inas018.isp.belgacom.be [195.238.4.131])
        by infbas002.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k9QIjFmm031727
        for <joris.at.lebbeke@skynet.be>; Thu, 26 Oct 2006 20:45:16 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx011.isp.belgacom.be (inmx011.isp.belgacom.be [195.238.5.50])
        by inas018.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k9QIjCCC005216
        for <joris.at.lebbeke@skynet.be>; Thu, 26 Oct 2006 20:45:14 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx011.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k9QIj1OG015364
        for <joris.at.lebbeke@skynet.be>; Thu, 26 Oct 2006 20:45:02 +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 k9QIYone021844;
	Thu, 26 Oct 2006 14:35:42 -0400
Received: from fmmailgate01.web.de (fmmailgate01.web.de [217.72.192.221])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k9QIYl9X021841
	for <tiff@lists.maptools.org>; Thu, 26 Oct 2006 14:34:47 -0400
Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172])
	by fmmailgate01.web.de (Postfix) with ESMTP id DF4732EB3F8C;
	Thu, 26 Oct 2006 20:34:42 +0200 (CEST)
Received: from [132.230.21.139] (helo=[132.230.21.139])
	by smtp06.web.de with asmtp (WEB.DE 4.107 #114)
	id 1GdA3u-0001z3-00; Thu, 26 Oct 2006 20:34:42 +0200
Message-ID: <4540FFC2.40603@web.de>
Date: Thu, 26 Oct 2006 20:34:42 +0200
From: Sebastian Boehmer <sebastian.boehmer@web.de>
User-Agent: Thunderbird 1.5.0.7 (X11/20060911)
MIME-Version: 1.0
To: Anurag Singh <contact.anurag@gmail.com>
Subject: Re: [Tiff] TIFFReadPrivateDirectory function is not working for SUBIFD
References: <11848b2f0610260821m892170ey7e8107f031b6dbb1@mail.gmail.com>
In-Reply-To: <11848b2f0610260821m892170ey7e8107f031b6dbb1@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Sender: sebastian.boehmer@web.de
Cc: Tiff <tiff@lists.maptools.org>
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.00001cb1
X-MSP-STORE: Thu, 26 Oct 2006 20:45:32 +0200
Status:   

Hello,

Yes that's right.
The __TIFFReadCustomDirectoryPart function reads only the tags with are
"registered" in parameter TIFFFieldInfo** info[].  The parameter size_t*
nfields is the size of this array.
You have to register the filed with TIFFMergeFieldInfo ...
Anyway is it although a question if we should read the tags which are
not registered like in TIFFReadDirectory.
I think we should. I will correct this next week. So long use the
TIFFMergeField function , please.

--
greets
> Hello All
>  
> I am trying to read subIFD with the help of 
> TIFFReadPrivateDirectory(TIFF* tif, toff_t diroff) , but finally got
> that it's not working.
>  
> this is the code snippet of the  function
>  
> __TIFFReadCustomDirectoryPart(TIFF* tif, toff_t diroff, size_t*
> nfields, TIFFFieldInfo** info[], int attrPrivateDirectory ) {
>
>  fix = 0;
>
> for (dp = dir, i = dircount; i > 0; i--, dp++) {
>
>       if (tif->tif_flags & TIFF_SWAB) {
>
>          TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
>
>        TIFFSwabArrayOfLong(&dp->tdir_count, 2);
>
>      }
>
>    if (fix >= *nfields || dp->tdir_tag == IGNORE)
>
>   continue;
>
> // none of the line executed below it
>
>  while (fix < *nfields && (*info)[fix]->field_tag < dp->tdir_tag)
>
>   fix++;
>
> }
>
>  }
>
> above nfields is tif->tif_nPrivateFields, which is always 0 at the
> time of SubIFD reading. So the loop never complete , it's always
> return from the same line.
>
> Please let me know how to read SubIFD with the help of the above
> fucntions.
>
> Thanks In Advance
>
> Anurag
>
>  
>
>  
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/

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