Hello all,
I'm writing a script to help operators inspect all available channels that
aren't RGB in an EXR. I'd like to create a 1fps GIF that shows all non-RGB
channels.

I am able to extract each channel and save it as JPG, but not finding the
proper syntax to save it as an animated GIF.

What I have so far:

import OpenImageIO as oiio

from OpenImageIO import ImageInput, ImageOutput

from OpenImageIO import ImageBuf, ImageSpec, ImageBufAlgo, ROI


input_path = 'vfx.exr'



img = oiio.ImageBuf(input_path)


for ch in [c for c in spec.channelnames if not c in ['R', 'G', 'B']]:

    ch_img = ImageBufAlgo.channels(img, (ch,ch,ch), newchannelnames=("R",
"G", "B"))

    ch_img = ImageBufAlgo.fit(ch_img, roi=ROI(0,640,0,480,0,1,0,3))

    ImageBufAlgo.render_text(ch_img, x=0, y=100, text=ch, textcolor=(1,1,1,1
))



    ch_img.write("{}.jpg".format(ch) ##



Thanks in advance for your help.

Best,
Jerome
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to