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
February 2006

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

2006.02.06 17:12 "Mega newbie question", by Dermot Paikkos
2006.02.06 17:42 "Re: Mega newbie question", by Joris Van Damme
2006.02.07 10:26 "Re: Mega newbie question", by Dermot Paikkos
2006.02.07 11:48 "Re: Mega newbie question", by Joris Van Damme
2006.02.07 13:11 "Re: Mega newbie question", by Dermot Paikkos
2006.02.07 13:38 "Re: Mega newbie question", by Joris Van Damme
2006.02.07 15:35 "Re: Mega newbie question", by Bob Friesenhahn
2006.02.07 16:27 "Re: Mega newbie question", by Joris Van Damme

2006.02.06 17:42 "Re: Mega newbie question", by Joris Van Damme

Dermot Paikkos wrote:
> I have been reading the docs at awaresystems.com on accessing the
> PhotoShop thumbnails within a tiff file.

That's .be, man... http://www.awaresystems.be/. Not all that glitters,
is .com.

> I am not sure what I am getting back from GetField. If I run the
> program below I get
>
> Value of GetField = 10124416
>
> Does that mean that the length of the block is 10124416 bytes? Or is
> this just it's unique identifier?

See section 'AUTOREGISTERED TAGS' on
http://www.remotesensing.org/libtiff/man/TIFFGetField.3tiff.html.

<quote>

If you can't find the tag in the table above that means this is
unsupported tag. But you still be able to read it's value if you know
the data type of that tag. For example, if you want to read the LONG
value from the tag 33424 and ASCII string from the tag 36867 you can use
the following code:

uint16 count;
void *data;

TIFFGetField(tiff, 33424, &count, &data);
printf("Tag %d: %d, count %d0, 33424, *(uint32 *)data, count);
TIFFGetField(tiff, 36867, &count, &data);
printf("Tag %d: %s, count %d0, 36867, (char *)data, count);

</quote>

I'm not too sure why count is declared uint16 here... It should be
uint32 if you ask me. Plenty of tags have potentially over 64K of data,
and in any case, the count in tags in actual file normal TIFF (not
BigTIFF) is unsigned 32bit. I'm also unsure why datatype is not returned
by this interface... I think it should be if it is to be used in a
robust manner. Otherwise, if the calling code supposes LONG datatype,
but the actual (possibly invalid) file states BYTE datatype, calling
code is next going to boom in an access violation when accessing past
1/4 of what is supposes is actual data.

Good luck. Don't be shy to post your results, I would welcome any good
actual code contribution to the Photoshop tag page.

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