TIFF and LibTiff Mail List Archive


2002.05.24 19:21 "How multipage is stored", by Scott Weber
2002.05.24 19:30 "RE: How multipage is stored", by David Phillips
2002.05.25 00:55 "RE: How multipage is stored", by Bostrup, Tore
2002.05.25 02:26 "Re: How multipage is stored", by Scott Weber

2002.05.25 02:26 "Re: How multipage is stored", by Scott Weber

Doh!! Found it. Thanks.

However, both original images have an FE (NewFileSubType) of: FE 00 04 00 01 00 00 00 00 00 00 00

And, as a result, the new combined image has this same entry in both IFD's

Spec says:
bit 0- image is a reduced resolution version of another image in
 this file
bit 1- Image is a single page in a multipage file
  (Isn't this what I created? )
bit 2- Image defines a transparency for another image

Shouldn't either bit 0 ot 1 be set? Should I do it myself?


"Bostrup, Tore" wrote:
> ...And if I'm not mistaken, each subsequent IFD represents another page if

the NewSubfileType tag (254 or FE) has a value of 2. The first IFD is always a full-resolution image, i.e. the first page.

-----Original Message-----

From: David Phillips [] Sent: Friday, May 24, 2002 3:31 PM

To: ''; Tiff

Look at the offset to the next IFD. This is the pointer to the next IFD. If it is zero there are no more images.


Ok, I've read the spec, and been playing with many pieces.

We have a need to combine multiple pages into a single file. tiffcp does that, so I'm studying the code. I built a multipage tif from individuals, and it's fine.

I then tried to dissect it with the spec, and can't figure out one thing. How does it know there's a second page?

There is a directory entry FE which is supposed to indicate multipage, but all it's value bits are set to zero.

It moved the directory (which people call IFD?) to a block after the data strip (that's fine because the header points there).

I found the second directory after the second data strip, again, that's fine. The second dir has pointer to the data, width values, height, etc. I understand all of it. But I can't see anywhere in the way the file is built that links the first page to the second.

It seems to me when the first page is read, it would think that that's all there is.

As I hand walk through the file, I go through the directory, come to the end of the first dir, read the strip, and that's it. How would a program know that there is a second page after the first one?

Any help is appreciated!