PlanarImageDesc

Caution

API Docs are a work in progress, expect them to improve over time.

class PlanarImageDesc : public OpenColorIO::`ImageDesc`_

All the constructors expect pointers to the specified image planes (i.e. rrrr gggg bbbb) starting at the first color channel of the first pixel to process (which need not be the first pixel of the image). Pass NULL for aData if no alpha exists (r/g/bData must not be NULL).

Note The methods assume the CPUProcessor bit-depth type for the R/G/B/A data pointers.

PlanarImageDesc(void *rData, void *gData, void *bData, void *aData, long width, long height)
PlanarImageDesc(void *rData, void *gData, void *bData, void *aData, long width, long height, BitDepth bitDepth, ptrdiff_t xStrideBytes, ptrdiff_t yStrideBytes)

Note that although PlanarImageDesc is powerful enough to also describe all :cpp:class:PackedImageDesc scenarios, it is recommended to use a PackedImageDesc where possible since that allows for additional optimizations.

~PlanarImageDesc()
void *getRData() const override

Get a pointer to the red channel of the first pixel.

void *getGData() const override

Get a pointer to the green channel of the first pixel.

void *getBData() const override

Get a pointer to the blue channel of the first pixel.

void *getAData() const override

Get a pointer to the alpha channel of the first pixel or null as alpha channel is optional.

BitDepth getBitDepth() const override

Get the bit-depth.

long getWidth() const override

Get the width to process (where x position starts at 0 and ends at width-1).

long getHeight() const override

Get the height to process (where y position starts at 0 and ends at height-1).

ptrdiff_t getXStrideBytes() const override

Get the step in bytes to find the same color channel of the next pixel.

ptrdiff_t getYStrideBytes() const override

Get the step in bytes to find the same color channel of the pixel at the same position in the next line.

bool isRGBAPacked() const override

Is the image buffer in packed mode with the 4 color channels? (“Packed” here means that XStrideBytes is 4x the bytes per channel, so it is more specific than simply any PackedImageDesc.)

bool isFloat() const override

Is the image buffer 32-bit float?

getAData(self: PyOpenColorIO.PlanarImageDesc) → array
getBData(self: PyOpenColorIO.PlanarImageDesc) → array
getGData(self: PyOpenColorIO.PlanarImageDesc) → array
getRData(self: PyOpenColorIO.PlanarImageDesc) → array