Hi, Hugh. Can you clarify whether you want to

(a) make a new RGB image R from B but G and B from A?
(b) make a new image with an additional channel, yielding {R, G, B, and New}, 
where R,G,B came from A and New is the R channel from B?

?


> On Aug 8, 2022, at 8:14 AM, Hugh Macdonald <hugh.macdon...@scanlinevfx.com> 
> wrote:
> 
> Hey all,
> 
> 
> I'm not overly familiar with the OIIO python API, so apologies if this is 
> quite a simple question! I can't find any information online on how to do 
> this with the Python API...
> 
> I've got 2 EXRs, both with RGB channels, and I'd like to take the R channel 
> from one of them and put it into another channel in the other.
> 
> I've been looking at doing a 2-step process. The first step being to rename 
> the channels in one ImageBuf, and to remove the unneeded channels, and the 
> second being to use ImageBufAlgo.channel_append() to combine the two images 
> together.
> 
> 
> This feels like it is unnecessarily 2 steps. Could someone point me at some 
> examples for how to do this in a single step?
> 
> 
> I'm sure that this is pretty simple, but all the examples that I can find are 
> for how to do this kind of thing using oiiotool, rather than doing it 
> directly using the API.
> 
> 
> Thanks
> 
> -- 
> Hugh
> 
> _______________________________________________
> 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