It takes a little mental gymnastics, but I think this might work:

oiiotool v004.2500.exr -subimage 0 -ch R,G,B v004.2500.exr -subimage 1 -ch 
A=red -chappend -o out.exr

So this grabs
 - the source image, takes just the first (i.e., #0) subimage, and just the 
R,G,B channels
 - the source image again, taking just the second (#1) subimage, extract just 
"red" and rename "A"
 - combines those two into one image with all four channels
 - output the result


> On Apr 8, 2021, at 2:04 PM, Jerome Raim <jerome.r...@gmail.com> wrote:
> 
> Hello all,
> Trying all sorts of things but not figuring out the proper syntax.
> 
> 
> I have the following multi image EXR:
> oiiotool -a -v --info v004.2500.exr
> Reading v004.2500.exr
> v004.2500.exr : 4956 x 2478, 4 channel, half openexr
>     2 subimages: 4956x2478 [h,h,h,h], 4956x2478 [h,h,h,h]
>  subimage  0: 4956 x 2478, 4 channel, half openexr
>     channel list: R, G, B, A
>     compression: "none"
>     framesPerSecond: 24000/1001 (23.976)
>     name: "rgba.main"
>     nuke/full_layer_names: 0
>     nuke/node_hash: "49f5abcb029f7aef"
>     nuke/version: "11.3v4"
>     PixelAspectRatio: 1
>     screenWindowCenter: 0, 0
>     screenWindowWidth: 1
>     view: "main"
>     oiio:ColorSpace: "Linear"
>     oiio:subimagename: "rgba.main"
>     oiio:subimages: 2
>     openexr:chunkCount: 2478
>     openexr:version: 1
>     smpte:TimeCode: 01:01:02:11
>  subimage  1: 4956 x 2478, 4 channel, half openexr
>     channel list: red, green, blue, alpha
>     compression: "none"
>     name: "matte_01.main"
>     PixelAspectRatio: 1
>     screenWindowCenter: 0, 0
>     screenWindowWidth: 1
>     view: "main"
>     oiio:ColorSpace: "Linear"
>     oiio:subimagename: "matte_01.main"
>     oiio:subimages: 2
>     openexr:chunkCount: 2478
>     openexr:version: 1
> 
> I'm struggling to figure out the proper syntax to do the following:
> 
> grab R,G,B channels from rgba.main
> and
> grab red from matte_01.main and map it to A 
> = yielding a single RGBA image
> 
> Alternatively, curious how to do:
> grab R,G,B channels from rgba.main
> and grab red from matte_01.main
> delete all other channels
> = yielding main.red, main.green, main.blue, matte.matte01 (previously called 
> matte_01.red)
> 
> Thanks in advance!
> 
> 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

Reply via email to