Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas017.isp.belgacom.be (localhost [127.0.0.1])
        by inav023.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id l11G6xUp025088
        for <joris.at.lebbeke@skynet.be>; Thu, 1 Feb 2007 17:06:59 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx003.isp.belgacom.be (inmx003.isp.belgacom.be [195.238.5.11])
        by inas017.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id l11G6tAV022606
        for <joris.at.lebbeke@skynet.be>; Thu, 1 Feb 2007 17:06:57 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx003.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l11G6oRo006257
        for <joris.at.lebbeke@skynet.be>; Thu, 1 Feb 2007 17:06:50 +0100
        (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 l11FlNKr030695;
	Thu, 1 Feb 2007 10:48:16 -0500
Received: from owl.phy.queensu.ca (owl.phy.QueensU.CA [130.15.24.27])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l11FkeQo030685
	for <tiff@lists.maptools.org>; Thu, 1 Feb 2007 10:46:40 -0500
Received: from [130.15.24.88] (U88.N24.QueensU.CA [130.15.24.88])
	by owl.phy.queensu.ca (8.13.1/8.13.1) with ESMTP id l11FkY7S020789
	for <tiff@lists.maptools.org>; Thu, 1 Feb 2007 10:46:39 -0500
Mime-Version: 1.0 (Apple Message framework v752.3)
In-Reply-To: <200701311705.l0VH53f1030173@duke.maptools.org>
References: <200701311705.l0VH53f1030173@duke.maptools.org>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <12DA7081-53C8-4E1D-AE17-8B134D97D7E4@owl.phy.queensu.ca>
Content-Transfer-Encoding: 7bit
From: Phil Harvey <phil@owl.phy.queensu.ca>
Subject: Re: [Tiff] Interpreting SubIFDs tag
Date: Thu, 1 Feb 2007 10:46:31 -0500
To: tiff@lists.maptools.org
X-Mailer: Apple Mail (2.752.3)
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1
	(owl.phy.queensu.ca [130.15.24.27]);
	Thu, 01 Feb 2007 10:46:39 -0500 (EST)
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.0000206b
X-MSP-STORE: Thu, 01 Feb 2007 17:07:08 +0100
Status:   

Thanks Ed.  You are correct.  A linked list of SubIFD's appears to be  
how the tag was intended to be used.  I have also located a sample  
TIFF image which uses this technique.

AUGGGGGHHHHHHHH!!!!!!  (can you tell I'm frustrated)

Now I have another fairly complex patch that needs to be added to my  
TIFF writing software.

I am really growing to hate the TIFF format.

The problem is that my software also supports re-writing RAW images,  
some of which are TIFF-based and can be virtually indistinguishable  
from TIFF images, and my software has to work for all of them.

In all of my TIFF-based RAW image samples, multiple SubIFD's are  
referenced by a multiple values of the SubIFD tag (ie. a count of >  
1), and not by chaining via the "next IFD" pointer.  I have taken a  
close look at my RAW samples, and in some of them the SubIFD "next  
IFD" pointer is non-zero but doesn't point to a valid IFD.  I have  
isolated the source of these images, and it appears that NEF images  
edited by Nikon Capture have this "feature".

So if I honour the SubIFD "next IFD" pointers, I must put in  
additional logic to validate the linked IFD to avoid problems with  
images such as the ones written by Nikon Capture.  This sort of  
validation is difficult to do reliably.

Yet another patch applied to my already much-too-complex TIFF  
module.  Oh well.

- Phil

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