Thanks for that info! This is harder than I imagined. Single image with many layers was much easier to code...
I'm also struggling with the added complication of roi != roi_full and creating a blank image spec in anticipation of unknown amount of matte channels about to be added. I'm attaching 3 dummy EXRs: 1 RGB (the comp), 1 matte EXR with 2 matte channels and another matte EXR with 2 additional matte channels. Larry, would you mind terribly boiler-plating some Python code on to create a single EXR with subimage 0 is RGB and subimage 1 is matte01,matte02,matte03,matte04 (ie combining the channels of the 2 matte EXRs). Sorry for the lack of self sufficiency... Best, Jerome On Mon, Feb 21, 2022 at 4:38 PM Larry Gritz <l...@larrygritz.com> wrote: > OpenEXR "parts" are not fully general implementations of multi-image > files. The parts need some attributes to be the same for all parts, and I > think displaywindow is one of them. > > My procrastination paid off! There is no way I would have guessed that was > your problem without the actual files you were using. > > -- lg > > > On Feb 21, 2022, at 1:34 PM, Jerome Raim <jerome.r...@gmail.com> wrote: > > Did some more troubleshooting. > out.open(out_filepath, (comp_buf.spec(), matte_buf.spec())) was returning > False. > > So I printed out.geterror() and oiio flagged a displayWindow mismatch. > > So I'm on the road to figuring this out... > > > On Mon, Feb 21, 2022 at 1:18 PM Jerome Raim <jerome.r...@gmail.com> wrote: > >> Hi everyone, >> I'm sure it's just a syntax problem, but I'm unable to do the following: >> >> I have an {R,G,B} EXR and a {mattes.matte01, mattes.matte02} EXR. >> >> I want to create an EXR with 2 subimages. The RGB comp as img 0, the >> mattes as (sub) img 1. >> >> I have my comp_buf and my mattes_buf and trying something like: >> >> out_filepath = '/tmp/exr.rexr' >> out = ImageOutput.create (out_filepath) >> out.open(out_filepath, (comp_buf.spec(), matte_buf.spec())) >> >> comp.write(out) >> out.open(out_filepath, comp_buf.spec()) >> out.open(out_filepath, matte_buf.spec(), "AppendSubimage")) >> matte_buf.write(out) >> >> out.close() >> >> Weirdly, supports("appendsubimage") returns false on the EXR. Am I not >> declaring something properly? >> >> Best, >> Jerome >> >> >> _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > > -- > Larry Gritz > l...@larrygritz.com > > > > > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >
<<attachment: multipart_exr_pkg.zip>>
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org