I noticed how easy it is to get the compression attribute from the
header with
the Imf::Header function compression() but there seems to be an issue
when setting compression
in a pre-existing header.
I am using the insert function like so to set Piz Compression (which, by
the way, is amazing)
header.insert ("compression", Imf::CompressionAttribute
(Imf::PIZ_COMPRESSION));
which is really just shorthand for saying this ...
// const Imf::Compression comp = Imf::PIZ_COMPRESSION;
// Imf::TypedAttribute<Imf::Compression> attr(comp);
// header.insert("compression", attr);
if I type it either way I get a long warning in .NET about a dynamic cast
C:\dev\rd\libs\3rdparty\OpenEXR\vc\vc7\include\IlmImf\ImfAttribute.h(355)
: warning C4541: 'dynamic_cast' used on polymorphic type
'Imf::Attribute' with /GR-; unpredictable behavior may result
C:\dev\rd\libs\3rdparty\OpenEXR\vc\vc7\include\Imath\ImathVec.h(234) :
while compiling class-template member function 'const
Imf::TypedAttribute<T> *Imf::TypedAttribute<T>::cast(const
Imf::Attribute *)'
with
[
T=Imf::Compression
]
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xstring(521) : while compiling class-template member
function 'Imf::TypedAttribute<T>::TypedAttribute(void)'
with
[
T=Imf::Compression
]
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(156) : while compiling class-template member
function 'Imf::TypedAttribute<T>::~TypedAttribute(void)'
with
[
T=Imf::Compression
]
C:\dev\rd\libs\3rdparty\OpenEXR\vc\vc7\include\IlmImf\ImfCompressionAttribute.h(54)
: see reference to class template instantiation 'Imf::TypedAttribute<T>'
being compiled
with
[
T=Imf::Compression
]
-----------------------------------------
I can stop this warning by adding the /GR flag to my compiler. The
option (/GR) adds code to check object types at run time.
I was worried that this might slow down the code though ..
What do you guys do and what do you suggest ?
Thanks
barnaby
------------------------------------------------------------------------
_______________________________________________
Openexr-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/openexr-devel