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.08.03 07:23 "[Tiff] RE: Tiff digest, Vol 1 #5 - 1 msg", by Andrey Kiselev

On Thu, Jul 31, 2003 at 05:48:15AM -0700, Tiglao, Percy wrote:

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.


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

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


       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'.


Andrey V. Kiselev

Home phone: +7 812 5274898 ICQ# 26871517