AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2007

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2007.01.31 10:53 "Interpreting SubIFDs tag", by <mikk@go2.pl>
2007.01.31 17:23 "Re: Interpreting SubIFDs tag", by Joris Van Damme
2007.02.01 09:42 "Re: Interpreting SubIFDs tag", by Gerben Vos
2007.02.01 18:32 "Re: Interpreting SubIFDs tag", by Joris Van Damme
2007.01.31 18:06 "Re: Interpreting SubIFDs tag", by Phil Harvey
2007.01.31 19:24 "Re: Interpreting SubIFDs tag", by Phil Harvey
2007.01.31 19:54 "Re: Interpreting SubIFDs tag", by Joris Van Damme
2007.01.31 22:24 "Re: Interpreting SubIFDs tag", by Ed Grissom
2007.02.01 18:17 "Re: Interpreting SubIFDs tag", by Phil Harvey
2007.02.01 18:34 "Re: Interpreting SubIFDs tag", by Joris Van Damme
2007.02.01 18:48 "Re: Interpreting SubIFDs tag", by Phil Harvey
2007.02.01 19:00 "Re: Interpreting SubIFDs tag", by Joris Van Damme
2007.02.01 19:36 "Re: Interpreting SubIFDs tag", by Phil Harvey
2007.02.01 20:02 "Re: Interpreting SubIFDs tag", by Joris Van Damme
2007.02.01 23:14 "Re: get tifftag_geoasciiparams string", by Phil Harvey
2007.02.02 00:07 "Re: get tifftag_geoasciiparams string", by Phil Harvey
2007.02.01 15:46 "Re: Interpreting SubIFDs tag", by Phil Harvey

2007.01.31 17:23 "Re: Interpreting SubIFDs tag", by Joris Van Damme

mikk,

mikk wrote:
> I'm a bit confused with interpreting SubIFDs tag value.
>
> Each value of N values in SubIFDs tag is an offset (from the beginning
> of the TIFF file, as always) to a child IFD. But is each value of N
> values an offset to a single child IFD, or to the first IFD from a
> linked list of IFDs? When I read each of these N child IFDs, am I
> supposed to interpret NextIFDOffset field and read next directory from
> this position for each of child IFDs?

Both are possible, and both are common. In fact, sometimes both are 
combined, and I've come accross files where the same second and third SubIFD 
gets pointed to in both ways.

What I do, is take the value of the SubIFDs tag as an array, and build a 
list of pending IFDs to read from that. For each IFD I read, I take its next 
IFD offset pointer and if it's not zero marking the end of the list, I add 
it to the front of that list of pending IFDs to read. Before adding any 
initial or secondary value to the list, I double-check and see that I've not 
read that IFD before.

The first part of this scheme makes sure I get at all SubIFDs, whether they 
are mentioned inside the tag value or inside a linked list, or both. The 
last action prevents double inclusion and IFD looping.


Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html