[Oiio-dev] exr "name" metadata issue
Chris Allen
callen at blizzard.com
Mon Jan 7 15:19:29 PST 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openimageio.org/pipermail/oiio-dev-openimageio.org/attachments/20190107/5cfae199/attachment.html>
More information about the Oiio-dev
mailing list