Re: PyOpenColorIO - Converting a simple singe RBG array to another colorspace
Larry Gritz
Which versions of OIIO and OCIO are you using? I'm not sure that official releases of OCIO (prior to the current master) will work with 8 bit integer pixels, which is what you'd get from a jpeg by default. So it may be misinterpreting the values. If you read with pixels = img.read_image(format='float') then you'll get float pixels, and perhaps that will match what Nuke is doing? As somewhat of an aside, maybe this is a contrived example and you need to do a lot more with PyOpenColorIO, but if all you are doing is color converting pixels you read with OIIO, an easier idiom would be:
and then you don't need to directly import or use OpenColorIO at all. (Though this assumes you built your OIIO with OCIO enabled.)
|
|