ImageDesc

class PyOpenColorIO.ImageDesc

This is a light-weight wrapper around an image, that provides a context for pixel access. This does NOT claim ownership of the pixels or copy image data.

ImageDesc() None
getBitDepth() PyOpenColorIO.BitDepth

Get the bit-depth.

getHeight() int

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

getWidth() int

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

getXStrideBytes() int

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

getYStrideBytes() int

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

isFloat() bool

Is the image buffer 32-bit float?

isRGBAPacked() bool

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.)

PyOpenColorIO.AutoStride: int

PackedImageDesc

class PyOpenColorIO.PackedImageDesc

All the constructors expect a pointer to packed image data (such as rgbrgbrgb or rgbargbargba) starting at the first color channel of the first pixel to process (which does not need to be the first pixel of the image). The number of channels must be greater than or equal to 3. If a 4th channel is specified, it is assumed to be alpha information. Channels > 4 will be ignored.

Note

The methods assume the CPUProcessor bit-depth type for the data pointer.

PackedImageDesc(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, numChannels: int) -> None

Note

numChannels must be 3 (RGB) or 4 (RGBA).

  1. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, numChannels: int, bitDepth: PyOpenColorIO.BitDepth, chanStrideBytes: int, xStrideBytes: int, yStrideBytes: int) -> None

Note

numChannels must be 3 (RGB) or 4 (RGBA).

  1. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, chanOrder: PyOpenColorIO.ChannelOrdering) -> None

  2. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, chanOrder: PyOpenColorIO.ChannelOrdering, bitDepth: PyOpenColorIO.BitDepth, chanStrideBytes: int, xStrideBytes: int, yStrideBytes: int) -> None

getBitDepth() PyOpenColorIO.BitDepth

Get the bit-depth.

getChanStrideBytes() int
getChannelOrder() PyOpenColorIO.ChannelOrdering

Get the channel ordering of all the pixels.

getData() numpy.ndarray

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

getHeight() int

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

getNumChannels() int
getWidth() int

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

getXStrideBytes() int

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

getYStrideBytes() int

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

isFloat() bool

Is the image buffer 32-bit float?

isRGBAPacked() bool

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.)

PlanarImageDesc

class PyOpenColorIO.PlanarImageDesc

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(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, width: int, height: int) -> None

  2. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, aData: buffer, width: int, height: int) -> None

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

  1. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, width: int, height: int, bitDepth: PyOpenColorIO.BitDepth, xStrideBytes: int, yStrideBytes: int) -> None

  2. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, aData: buffer, width: int, height: int, bitDepth: PyOpenColorIO.BitDepth, xStrideBytes: int, yStrideBytes: int) -> None

getAData() numpy.ndarray

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

getBData() numpy.ndarray

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

getBitDepth() PyOpenColorIO.BitDepth

Get the bit-depth.

getGData() numpy.ndarray

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

getHeight() int

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

getRData() numpy.ndarray

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

getWidth() int

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

getXStrideBytes() int

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

getYStrideBytes() int

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

isFloat() bool

Is the image buffer 32-bit float?

isRGBAPacked() bool

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.)