Hi!

I'm attempting to extract only the RGBA channels of an EXR with 70+
channels.

Using:
oiiotool -i:ch=R,G,B,A /path/to/gigantic.exr -o manageable.exr
takes about 8 seconds.

In python (2.7 !caugh..):
buf = oiio.ImageBuf('/path/to/gigantic.exr')
obuf = oiio.ImageBufAlgo.channels(buf, ('R', 'G', 'B', 'A'))
obuf.write('manageable.exr')
takes 4+ minutes

I tried only extracting one channel and it took the exact amount of time. I
expect a performance hit using python but this seems a bit off. I suspect
the python bindings are reading all the channels even though I'm asking for
a specific few.
I might of course be going about this completely wrong, in which case a
pointer in the right direction would be highly appreciated :)

Straight read and write of the same file is done quickly.

Thanks!

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

Reply via email to