Hi Larry, That sounds (and looks) great. Thanks! Chris
________________________________ From: Oiio-dev <[email protected]> on behalf of Larry Gritz <[email protected]> Sent: Monday, March 4, 2019 8:25 PM To: OpenImageIO developers Subject: Re: [Oiio-dev] exr "name" metadata issue Sorry for the delay, Chris. I think your proposed solution makes sense, and I've submitted it as https://github.com/OpenImageIO/oiio/pull/2190 On Jan 7, 2019, at 3:19 PM, Chris Allen <[email protected]<mailto:[email protected]>> wrote: 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]<mailto:[email protected]> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]<mailto:[email protected]>
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
