AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2005.07.27 15:00 "User Defined Tags (TIFF_FLOAT)", by <randy@photon-x.com>
2005.07.27 19:45 "Re: User Defined Tags (TIFF_FLOAT)", by Andrey Kiselev

2005.07.27 15:00 "User Defined Tags (TIFF_FLOAT)", by <randy@photon-x.com>

Greetings All,

I'm attempting to add my own user-defined tags to tiff files that I write. I 
found the following example of how to do this online @ 
http://www.asmail.be/msg0054585832.html. I have implemented this and it 
works. However, when I try to change the field_passcount to FALSE, it does 
not seem to work. I'm using libtiff v. 3.7.3 on Windows XP. Here are the 
relevant code snippets that I have. If I take the code I have and replace 
TIFF_FLOAT with TIFF_LONG and float with long, everything works correctly. 
Float values are the only ones that appear to be broken. Any suggestions on 
what I might have done wrong? 

Thanks.

------------------

#define TIFFTAG_PV_TIMESTAMP     (TIFFTAG_PV_START + 2)

static const TIFFFieldInfo tExtraTiffFieldInfo[] = {
 {TIFFTAG_PV_INTEGRATION_TIME, 1, 1, TIFF_FLOAT, FIELD_CUSTOM, TRUE, FALSE, 
"PV_IntegrationTime"},
 ...
};


// setting the floating point value
float fNumber = 123.0f;
TIFFSetField (pTiff, TIFFTAG_PV_INTEGRATION_TIME, fNumber);

// Getting the floating point value
float fNumber;
TIFFGetField (pTiff, TIFFTAG_PV_INTEGRATION_TIME, &fNumber));
// fNumber = 0.0f here.. which is not what it ought to be