TIFF and LibTiff Mail List Archive

2007.11.23 18:04 "[Tiff] Custom Tags and TIFFGetField", by Antonio Scuri


I'm using TIFFGetTagListCount and TIFFGetTagListEntry to loop over all the readed custom tags and import them to my own attribute system.

But since _TIFFVGetField is highly tag dependent I had to use the TIFFFieldInfo definition to interpret the tag type and count. I just checked in libTIFF 4.0 from CVS and TIFFFieldInfo is marked as obsolete, but there are no new functions that replace them.

What I need is something like TIFFGetTagListEntryInfo that returns some parameters of the actual tag readed from file like count and type. But I also need field_passcount because _TIFFVGetField number of parameters depend on it.

Also from _TIFFVGetField:

                                                if ((fip->field_type ==

                                                    || fip->field_readcount
                                                    || fip->field_readcount
                                                    || fip->field_readcount
                                                    || tv->count > 1)

It will return an internal pointer instead of copying the data. So another parameter describing this situation is necessary.

Maybe I should implement two new functions that access libTIFF internal data, called TIFFGetCustomFieldInfo(tag,&count,&type) and TIFFGetCustomField(tag,array) with fixed parameters and a pre-allocated array.

Any suggestions?

Antonio Scuri