Re: Apply color transformation on images containing a single channel

Jeremy Selan <jeremy...@...>

If your image is packed separately per channel (ex:  RRRRRRR... GGGGG... BBBB.... ), the Planar ImageDesc is probably what you're looking for. Give that a try?

PlanarImageDesc(float * rData, float * gData, float * bData, float * aData,
                        long width, long height,
                        ptrdiff_t yStrideBytes = AutoStride);

Note that the float * for alpha is optional, so if you are only loading RGB you can pass a NULL ptr for that.

-- Jeremy

On Wed, Apr 10, 2013 at 8:36 PM, Mark Boorer <mark...@...> wrote:

In my application, images are split into their separate channels, and operations are performed per channel. I have individual float arrays for each channel (obtained via openimageio), and I would like to perform a colorspace transformation to each, preferably without joining them together.
I noticed that the PackedImageDesc docs say it ignores channels > 4, is there an easy way in the c++ library to provide a float array, and specify which channel it contains to perform the transformation?

Something like:

OCIO::PackedImageDesc img(data, w, h, 1, "R");


You received this message because you are subscribed to the Google Groups "OpenColorIO Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocio-dev+u...@....
For more options, visit

Join { to automatically receive all group messages.