Hello,
Another developer here is using OIIO's python bindings to read a single exr 
file and split its multi-layer channels, currently in one part, into 
multi-part, but has run into an issue.  Our configuration of VRay appears to be 
creating a metadata attribute called "name" but with a value of "", so when 
OpenEXRInput::PartInfo::parse_header() (in exrinput.cpp) calls 
Imf::Header::hasName() function, hasName() to return true.  When outputting a 
multi-part exr you have to give it a series of ImageSpec objects, but they're 
all getting initialized to the same "" name value, causing a write exception.

As a workaround, he's stripping all metadata as a preprocess, and making a 
multi-part from that stripped file works.  Our suggestion would be that instead 
of just:
    if (header->hasName())
        spec.attribute("oiio:subimagename", header->name());

maybe it should be:
    if (header->hasName() && header->name() != "")
        spec.attribute("oiio:subimagename", header->name());

or something equivalent?  Or do you have any other suggestions for how to 
handle this edge case?

Thanks...

Chris

_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to