TIFF and LibTiff Mail List Archive


2003.07.28 23:29 "[Tiff] extended tags", by Tiglao, Percy
2003.07.29 01:06 "[Tiff] extended tags", by Chris Cox
2003.07.30 12:24 "[Tiff] extended tags", by Andrey Kiselev
2003.07.31 12:48 "[Tiff] RE: Tiff digest, Vol 1 #5 - 1 msg", by Tiglao, Percy
2003.08.03 07:23 "[Tiff] RE: Tiff digest, Vol 1 #5 - 1 msg", by Andrey Kiselev
2003.09.25 10:45 "[Tiff] Extended rational tag.", by David Christopher

2003.07.31 12:48 "[Tiff] RE: Tiff digest, Vol 1 #5 - 1 msg", by Tiglao, Percy


Thank you very much for the sample code. Do you have any other suggestions on how to handle private tag of type "UNDEFINED" without modifying libtiff. Type "ASCII" does not work well for my private field since my complex structure contains, among other type, several null terminated array of characters (strings). Reading of the field stops as soon as the first null is encountered.


Percy Tiglao


Message: 1

Subject: Re: [Tiff] extended tags

On Mon, Jul 28, 2003 at 04:29:07PM -0700, Tiglao, Percy wrote:

I am new to libtiff and I have been trying to use Niles' contrib/tags code to no avail. Does anyone have a sample code that I could use as a reference that adds a private tag of type "TIFF_UNDEFINED" to support a complex data structure in a single private field?

Following code valid for the libtiff 3.6.0 (from CVS or beta release):

#include <tiffio.h>

#define TIFFTAG_MYTAG 666

int main()
    TIFF *tiff;

static const TIFFFieldInfo xtiffFieldInfo[] = {
      1, 0, "MyTag" }

tiff = TIFFOpen("test.tiff", "r+");

TIFFMergeFieldInfo(tiff, xtiffFieldInfo,
                   sizeof(xtiffFieldInfo) / sizeof(xtiffFieldInfo[0]));

TIFFSetField(tiff, TIFFTAG_MYTAG, "Tag contents"); TIFFRewriteDirectory(tiff);



Tiff mailing list