Sorry to say there's no OIIO API to do this, and neither is there any facility 
in the underlying libOpenEXR to do it, to the best of my knowledge. Exr files 
are "write once."

I suppose that knowing the byte-by-byte layout of an exr file, it may be 
possible to hack it on your own, but that would be a big PITA and limited to 
edits that can truly be done in place without shifting any of the offsets of 
existing other data.

Note to self: next time we need to design an image format from scratch, we 
should remember to make modification or addition of metadata to be inexpensive 
to do in place without needing to read (let alone rewrite) the pixels.


> On Aug 3, 2022, at 8:13 PM, Anders Langlands <anderslangla...@gmail.com> 
> wrote:
> 
> I want to open an image file and just set a few attributes in the header, 
> then save it again not touching the image data at all. What's the 
> quickest/easiest way to do this in the python API?
> 
> Cheers,
> Anders

--
Larry Gritz
l...@larrygritz.com





_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to