AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.08.11 19:49 "RE: [Tiff] Newbie RICHTIFFIPTC query -- code snippet (sample usage of TIFFTAG_RICHTIFFIPTC)", by
2006.08.11 10:29 "[Tiff] Newbie RICHTIFFIPTC query", by Beginner
2006.08.11 15:00 "Re: [Tiff] Newbie RICHTIFFIPTC query", by Dermot Paikkos
2006.08.11 17:37 "RE: [Tiff] Newbie RICHTIFFIPTC query", by
2006.08.11 15:53 "RE: [Tiff] Newbie RICHTIFFIPTC query", by Beginner
2006.08.11 16:12 "RE: [Tiff] Newbie RICHTIFFIPTC query", by Bob Friesenhahn

2006.08.11 16:12 "RE: [Tiff] Newbie RICHTIFFIPTC query", by Bob Friesenhahn

There is something wrong with my assignment I think

I currently have this:

uint32 count;

char *data;

snip

if (TIFFGetField(tif, TIFFTAG_RICHTIFFIPTC, &count, &data) == 0) {

printf("Size of IPTC Tag is %d bytes.\n", &count);

Which yelds this:

>> Size of IPTC Tag is -18344092 bytes.

You should be using %u rather than %d to print an unsigned value. Regardless, some recent libtiff releases have had severe problems in this area. Some releases have treated the 'count' argument as a 16-bit type while others have treated it as 32 bit. The most recent release also has a nasty bug in its tag code which shows up on big-endian CPUs.

As far as I am aware, the current libtiff CVS code retrieves these tags correctly.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/