Color space transformation issue (first-time user)


Hello all!

I'm using a renderer which outputs images in linear color space with HDR colors (16 bit), and I want to use OCIO to apply tone mapping +gamma correction to these images to convert them to sRGB space, but I'm somewhat uncertain on how to approach this. There are some usage examples on , however they appear to be outdated, as some of the functions used in them (like "getDefaultDisplayDeviceName" or "getDisplayColorSpaceName") do not exist anywhere in the code base.
I ended up using the "ocioconvert" app shipped with the repository as a base instead, but I'm still not entirely sure on how to go about it.
For my test program I've loaded the "spi-vfx" configuration ( and tried setting up the color space transformation for my image like so:
OCIO::DisplayViewTransformRcPtr t = OCIO::DisplayViewTransform::Create();
processor = config->getProcessor(t);
The input color space is "lnh", since my input colors are 16 Bit HDR colors in linear color space.
"display" and "view" are set to "sRGB"/"Film", which, as I understand it, should transform the colors for output on a sRGB display.

The program runs without any errors, but after the transformation the output image mostly just looks very milky:
I've had similar results with other configurations. My understanding of color management is still somewhat limited, so I'm not sure what I'm doing wrong, any guidance would be much appreciated!

Here's my test program code with the input image and executable (Windows), if needed:

Thank you!

Join { to automatically receive all group messages.