AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.07.28 23:29 "[Tiff] extended tags", by Percy Tiglao
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 Percy Tiglao
2003.08.03 07:23 "[Tiff] RE: Tiff digest, Vol 1 #5 - 1 msg", by Andrey Kiselev

2003.08.03 07:23 "[Tiff] RE: Tiff digest, Vol 1 #5 - 1 msg", by Andrey Kiselev

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,

You may consider using one of the two approaches for your structure.

1. Split your data in different tags. For example, if you have

   struct
   {
       short   iValue;
       double  dfValue;
       char*   pszStr1;
       char*   pszStr2;
   }

you can define four new tags with appropriate datatypes. Every string and every value will go into separate field.

2. Serialize all your data into string value, place this string into tag and deserilize when reading.

Using one of this approaches will take you such an advantage that your additional data could be simply explored with utilities like `tiffdump'.

Regards,
Andrey

Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517