Hello, I am wondering what the correct way to GET a numpy array from an ImageBuf object and convert TO an ImageBuf object. It seems that you can do either: img_input = oiio.ImageBuf(path) image = img_input.get_pixels() or
img_input = oiio.ImageInput.open(path) image = img_input.read_image(format="uint16") to GET a numpy arrray when opening a file. 1) Which one is the correct way to get the numpy array or can both be used? 2) What is the correct way to convert the numpy array back to an ImageBuf for further processing/saving to a file with OIIO? I have been unable to get set_pixels to work... For some background, here's what I need to do: 1. Open the image with OIIO and convert to a numpy array.2. Do processing with numpy, etc3. (Possibly do processing with OIIO, so that means it need to be converted to an ImageBuf object, correct?) 4. Save the file with OIIO. Thank you in advance for your time. :)
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org