| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2005.08.15 14:41 "Re: TIFF Thumbnail", by Ed GrissomIn a previous message, Joris said: > katrina maramba wrote: > > I have observed that not all TIFF images have multiple directories, > > The definitive document on thumbnails in TIFF, and related, is the > specification supplement that describes the SubIFD tag, which can be > found here: > > http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf > > ... > > This being said, there are a number of other schemes 'out there'. Here > are two of the most common: > > - Some software writes thumbnails the 'old-style' pre-SubIFD way. This > usually results in a two-page TIFF, the second page being a > thumbnail > of the first bigger image. You can detect this situation by checking > - number of pages (must be 2) > - NewSubfileType or SubfileType tags (must be present and reflect > this relationship) > - sizes (2nd must be smallest) There is also the case where there are multiple reduced resolution images -- i.e. multiple "thumbnails" -- although I would probably only call the smallest the thumbnail. The "number of pages" confuses me -- perhaps you meant "number of IFDs" instead ? If not, are you suggesting that the pagenumber tag be used ? > > And how can the reader determine the directory number(?) in which > > the thumbnail belongs (so it doesnt have to read the other > > directories)? You can't. You have to read the other directories. See the last line of the following quote from the TIFF 6.0 spec, section 7 p26 : "Multiple subfiles. TIFF readers must be prepared for multiple images (subfiles) per TIFF file, although they are not required to do anything with images after the first one. TIFF writers are required to write a long word of 0 after the last IFD (to signal that this is the last IFD), as described earlier in this specification. If multiple subfiles are written, the first one must be the full-resolution image. Subsequent images, such as reduced-resolution images, may be in any order in the TIFF file. If a reader wants to use such images, it must scan the corresponding IFD's before deciding how to proceed." -- ed grissom ed.grissom@intergraph.com |
|||||||