My attempt:
fipTag t;
t.setType(FIDT_LONG);
t.setKey("FrameTime");
long l = 128;
t.setValue(&l);
supposedly this set the tag value to 128 long
However..
const long * lo = static_cast<const long*> ( t.getValue() );
cout << "t.getValue() " << *lo << " ?? doesn't look right" << endl; // 847909360
cout << "l == *lo " << (l == *lo) << endl; // false
What's up? How do we correctly set and get the value of a fipTag in FreeImagePlus?
The unhelpful documentation: http://freeimage.sourceforge.net/fip/classfipTag.html#a34b0b079bc222aaf4b4d1ad4ce423f82
The whole code:
#include <FreeImagePlus.h>
#include <iostream>
using namespace std;
int main(void)
{
fipTag t;
t.setType(FIDT_LONG);
t.setKey("FrameTime");
long l = 128;
t.setValue(&l);
const long * lo = static_cast<const long*> ( t.getValue() );
cout << "t.getValue() " << *lo << " ?? doesn't look right" << endl;
cout << "l == *lo " << (l == *lo) << endl;
return 0;
}