2005.08.24 04:59 "Re: [Tiff] TIFF Thumbnail", by Katrina Maramba
I encountered a problem on one of the thumbnails of the images I have..
While parsing the thumbnail data through the API TIFFReadRGBAStrip, it had an error in TIFFRGBAImageOK that says "Sorry, can not handle images with 0-bit samples."
I checked in AsTiffTagViewer, it displayed:
BitsPerSample Short 3 (count) 8,8,8 (value)
But in Hex Workshop:
The value pointed by the offset in tag 102 of the thumbnail IFD is indeed 0.
How come the AsTiffTagViewer found the three 8's? Is there a behavior that the child (which is the thumbnail) would inherit this particular characteristic of the parent (main image)???
Please help. Thanks!
--- Joris <email@example.com> wrote:
Your quoting style is defenetly improving. Thanks for posting a message that doesn't take so much effort to 'decode'!
However, you may or may not be aware, but there's still two problems left:
- There is a HTML version included. Granted, we don't flame everyone posting HTML, that would otherwise be a lot of work.
- In the HTML version, the complete mail is still marked as quote. That is confusing. Many readers will quickly skim it, used to visually skipping bad over-quotes, and think there's not actually anything of your own added to the quote, and thus not even read it. You may want to solve that, to ensure your messages to actually be noticed. It'll save those who do the additional effort of reading through to find your follow-up question some time, too.
The best solution, depending on your mail client, might be to not include a HTML version at all, thus being able to focus on the single plain text version and get that right. It is recommended to not post HTML to the mailing list anyway. Thanks again for caring!
Assuming that I have determined that this image has a thumbnail indeed, can I go and look for the thumbnail's IFD and and parse it like the main image's directory (which is (for example) call TIFFReadDirectory)?
And if so, can I also go and look for the thumbnail's strip (using strip offsets and strip byte count) and process the thumbnail using TIFFReadRGBAStrip (which would generate RGB data)?
If not, what would be the correct API to call to process the thumbnail?
Yes, if the thumbnail is indeed a regular IFD (as opposed to private tag data as including in the Photoshop tag and such), then all normal IFD handling applies. There is no difference in actual format, nor in LibTiff decoding api, between a 'regular' image and a thumbnail thereof.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around