Re: ImageBufAlgo make_texture colorspace change


I didn't check for ok in the code snippet I provided, but ok is True, and colorBuf.geterror() returns an empty string.

On Saturday, August 20, 2016 at 9:36:18 AM UTC-7, Larry Gritz wrote:
On Aug 19, 2016, at 11:38 PM, er...@... wrote:

 Still, I wish there was an error or a warning telling me I'm using colorspace names that don't exist. 

There is, you just weren't checking it:

import OpenImageIO

srcBuf = ImageBuf(src_path)
colorBuf = ImageBuf()
ok = OpenImageIO.ImageBufAlgo.colorconvert(colorBuf, srcBuf, 'sRGB', 'linear')
if not ok :
    print colorBuf.geterror()
OpenImageIO.ImageBufAlgo.make_texture(OpenImageIO.MakeTxTexture, colorBuf, dst_path)

Larry Gritz

Join to automatically receive all group messages.