Hi All,
I have a requirement to process EXR files in a specific way - Read a multipart
EXR, apply a colour transform to one or more of the subimages contained within
it, and write out the rest untouched.
This all works fine except for the part names - they do not seem to be
preserved on write.
It is possible I am just Doing It Wrong(TM), but it seems this behaviour more
closely resembles a bug than a feature.
On EXR read, I get the part name from the oiio:subimagename metadata field that
the exrinput plugin fills in, but on write, despite the ‘oiio:subimagename’
field being present in the ImageSpec, generic part names such as
’subimage00/subimage01’ get written.
I also notice, in exroutput.c, that there is some kind of prefix-stripping
occurring on a field named ‘oiio::subimagename’, however this does not
correspond to the prefix used on read, with would be ‘oiio:subimagename’ (note
the extra colon). I don’t think this in itself is a problem, because I can’t
see any code to fill in the header name with the contents of any metadata field
on write, no matter hwat it is named i.e. I do not see where a call to
header->setName() anywhere in exroutput.cpp
741 bool
742 OpenEXROutput::put_parameter (const std::string &name, TypeDesc type,
743 const void *data, Imf::Header &header)
744 {
...
763 else if (Strutil::iequals(xname, "name"))
764 xname = "oiio::subimagename”; <————— this looks wrong?
…
This may be a bit of a problem for losslessly roundtripping multipart exr
through OIIO.
I also note that an additional ‘openexr:chunkCount’ metadata field seems to be
written into my exrs, along with the ‘official’ chunkCount metadata when
writing multipart exr from OIIO.
Just want to check I am not missing something obvious?
Thanks,
-Pete
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org