PyOpenColorIO - Converting a simple singe RBG array to another colorspace


mhamid3d@...
 

Hi all,

I am new to this and hoping to get some help. I have a simple single pixel RGB value that is in a Raw color space. I would like to convert it to another colorspace. I have the following code, which produced no errors but I'm not getting the values I'm expecting. As reference I'm using Nuke with the OCIOColorSpace node. I made sure to set my Display Transform to None in Nuke. Then I created a simple constant with pure red. (1, 0, 0) and exported it as a Raw colorspace jpg. Loaded that into PyOpenColorIO and ran the code bellow. It returns a value very different from the one I'm getting Nuke. Am I doing something wrong?

import PyOpenColorIO as ocio
import OpenImageIO as oiio

config = ocio.GetCurrentConfig()
proc = config.getProcessor('Raw', 'Film_EIZO')

img = oiio.ImageInput.open('test_image.jpg')
pixels = img.read_image()
img.close()

imgd = proc.applyRGB(pixels)
print imgd

Join {ocio-dev@lists.aswf.io to automatically receive all group messages.