ImageBufAlgo make_texture colorspace change


er...@...
 

Hi,
I'm using the Python bindings for OIIO to convert images into textures. I'm having an issue converting a .tif into a .exr texture. The .exr is in sRGB colorspace instead of linear. The .exr looks lighter in Nuke than the .tif. I tried to force the colorspace change, but it didn't work either. Here are two ways I tried to make the texture:

import OpenImageIO

srcBuf
= ImageBuf(src_path)
config
= OpenImageIO.ImageSpec()
config
.attribute('maketx:incolorspace', 'sRGB')
config
.attribute('maketx:outcolorspace', 'linear')
OpenImageIO.ImageBufAlgo.make_texture(OpenImageIO.MakeTxTexture, srcBuf, dst_path, config)


and 

import OpenImageIO

srcBuf
= ImageBuf(src_path)
colorBuf
= ImageBuf()
OpenImageIO.ImageBufAlgo.colorconvert(colorBuf, srcBuf, 'sRGB', 'linear')
OpenImageIO.ImageBufAlgo.make_texture(OpenImageIO.MakeTxTexture, colorBuf, dst_path)


I don't get any errors, but nothing changes. Am I using the wrong colorspace names? I don't know where to find them since they aren't listed in the documentation.

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