2006.08.11 19:49 "RE: [Tiff] Newbie RICHTIFFIPTC query -- code snippet (sample usage of TIFFTAG_RICHTIFFIPTC)", by

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;


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 Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/