Um, yeah, there's a simple way to pull pixels out, but not an easy way to insert them (other than one at a time).
I can probably add something for you easily (essentially, set_pixels). But before I do, can you explain what you're trying to do overall, just in case there's some better API strategy already in there? On Jun 4, 2015, at 4:24 PM, Jonathan Gibbs <[email protected]> wrote: > Does anyone have a good/simple example of working with OIIO in python. I can > get at the raw pixels nicely enough with ImageBuf.get_pixels(), but it's not > clear the best way to get those pixels back into an ImageBuf for writing. > (There is no set_pixels.) > > As a side note, get_pixels returns a Python array, which I can convert easily > enough to a numpy.ndarray. Is there a better way to get from a ImageBuf to a > numpy.ndarray and back again in a reasonably efficient manner? > > --jono > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
