Ah nevermind, my issue was unrelated.  I just discovered going from a PIL
image to a numpy array flips the axes unexpectedly,

cheers,
Daniel

On Tue, 5 May 2020 at 15:16, Daniel Flood <daniel.flood...@gmail.com> wrote:

> Hi folks,
>
> I'm new to using the python API of oiio, and am trying with a build of
> 2.1.9.0.
>
> I have a Numpy array of type uint8 which I'm trying to put into an
> ImageBuf like so:
>
> buf = ImageBuf(ImageSpec(843, 474, 3, oiio.UINT8))
> buf.set_pixels(ROI(), my_numpy_array)
>
> However this returns false.  If I call buf.get_p;pixels(), I see that the
> dtype=float32, so it seems the oiio.UINT8 argument to ImageSpec isn't
> having an effect?
>
> cheers,
> Daniel
>
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to