On 06/12/2013 04:27 PM, Richard Hadsell wrote:
I want to store long int attributes in an EXR file, but the value I get when
reading it back is always 5. The string, int, and double attributes that are
part of the library seem fine.
I'm using openexr 2.0.0 on a Linux Fedora 14 OS. Here's the way I defined the
attribute:
namespace Imf_2_0 {
typedef TypedAttribute<long> LongAttribute;
template <> const char *LongAttribute::staticTypeName ();
}
template <>
const char * Imf_2_0::LongAttribute::staticTypeName ()
{
return "long";
}
In a debugger I can see that the attribute has the correct value, when I insert it into the header for output. When reading it from the file, the named attribute gets the right typeName. It just has the wrong value, and all of the LongAttributes have
the same value.
Is this a known bug?
More information: if change to this, keeping everything else the same:
typedef TypedAttribute<double> LongAttribute;
and then cast between long and double for writing and reading the value, the
value I read back from the file is correct.
_______________________________________________
Openexr-devel mailing list
Openexr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel