openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Unable to save 64-bit long attributes


From: Richard Hadsell
Subject: Re: [Openexr-devel] Unable to save 64-bit long attributes
Date: Wed, 12 Jun 2013 16:36:35 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]