HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OCIO_NAMESPACE::PackedImageDesc Class Reference

#include <OpenColorIO.h>

+ Inheritance diagram for OCIO_NAMESPACE::PackedImageDesc:

Public Member Functions

 PackedImageDesc (void *data, long width, long height, long numChannels)
 
 PackedImageDesc (void *data, long width, long height, long numChannels, BitDepth bitDepth, ptrdiff_t chanStrideBytes, ptrdiff_t xStrideBytes, ptrdiff_t yStrideBytes)
 
 PackedImageDesc (void *data, long width, long height, ChannelOrdering chanOrder)
 
 PackedImageDesc (void *data, long width, long height, ChannelOrdering chanOrder, BitDepth bitDepth, ptrdiff_t chanStrideBytes, ptrdiff_t xStrideBytes, ptrdiff_t yStrideBytes)
 
virtual ~PackedImageDesc ()
 
ChannelOrdering getChannelOrder () const
 Get the channel ordering of all the pixels. More...
 
BitDepth getBitDepth () const override
 Get the bit-depth. More...
 
voidgetData () const
 Get a pointer to the first color channel of the first pixel. More...
 
voidgetRData () const override
 Get a pointer to the red channel of the first pixel. More...
 
voidgetGData () const override
 Get a pointer to the green channel of the first pixel. More...
 
voidgetBData () const override
 Get a pointer to the blue channel of the first pixel. More...
 
voidgetAData () const override
 
long getWidth () const override
 Get the width to process (where x position starts at 0 and ends at width-1). More...
 
long getHeight () const override
 Get the height to process (where y position starts at 0 and ends at height-1). More...
 
long getNumChannels () const
 
ptrdiff_t getChanStrideBytes () const
 
ptrdiff_t getXStrideBytes () const override
 Get the step in bytes to find the same color channel of the next pixel. More...
 
ptrdiff_t getYStrideBytes () const override
 
bool isRGBAPacked () const override
 
bool isFloat () const override
 Is the image buffer 32-bit float? More...
 
- Public Member Functions inherited from OCIO_NAMESPACE::ImageDesc
 ImageDesc ()
 
virtual ~ImageDesc ()
 

Detailed Description

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.

Definition at line 2818 of file OpenColorIO.h.

Constructor & Destructor Documentation

OCIO_NAMESPACE::PackedImageDesc::PackedImageDesc ( void data,
long  width,
long  height,
long  numChannels 
)
Note
numChannels must be 3 (RGB) or 4 (RGBA).
OCIO_NAMESPACE::PackedImageDesc::PackedImageDesc ( void data,
long  width,
long  height,
long  numChannels,
BitDepth  bitDepth,
ptrdiff_t  chanStrideBytes,
ptrdiff_t  xStrideBytes,
ptrdiff_t  yStrideBytes 
)
Note
numChannels must be 3 (RGB) or 4 (RGBA).
OCIO_NAMESPACE::PackedImageDesc::PackedImageDesc ( void data,
long  width,
long  height,
ChannelOrdering  chanOrder 
)
OCIO_NAMESPACE::PackedImageDesc::PackedImageDesc ( void data,
long  width,
long  height,
ChannelOrdering  chanOrder,
BitDepth  bitDepth,
ptrdiff_t  chanStrideBytes,
ptrdiff_t  xStrideBytes,
ptrdiff_t  yStrideBytes 
)
virtual OCIO_NAMESPACE::PackedImageDesc::~PackedImageDesc ( )
virtual

Member Function Documentation

void* OCIO_NAMESPACE::PackedImageDesc::getAData ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

void* OCIO_NAMESPACE::PackedImageDesc::getBData ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

BitDepth OCIO_NAMESPACE::PackedImageDesc::getBitDepth ( ) const
overridevirtual

Get the bit-depth.

Implements OCIO_NAMESPACE::ImageDesc.

ChannelOrdering OCIO_NAMESPACE::PackedImageDesc::getChannelOrder ( ) const

Get the channel ordering of all the pixels.

ptrdiff_t OCIO_NAMESPACE::PackedImageDesc::getChanStrideBytes ( ) const
void* OCIO_NAMESPACE::PackedImageDesc::getData ( ) const

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

void* OCIO_NAMESPACE::PackedImageDesc::getGData ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

long OCIO_NAMESPACE::PackedImageDesc::getHeight ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

long OCIO_NAMESPACE::PackedImageDesc::getNumChannels ( ) const
void* OCIO_NAMESPACE::PackedImageDesc::getRData ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

long OCIO_NAMESPACE::PackedImageDesc::getWidth ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

ptrdiff_t OCIO_NAMESPACE::PackedImageDesc::getXStrideBytes ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

ptrdiff_t OCIO_NAMESPACE::PackedImageDesc::getYStrideBytes ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.

bool OCIO_NAMESPACE::PackedImageDesc::isFloat ( ) const
overridevirtual

Is the image buffer 32-bit float?

Implements OCIO_NAMESPACE::ImageDesc.

bool OCIO_NAMESPACE::PackedImageDesc::isRGBAPacked ( ) const
overridevirtual

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

Implements OCIO_NAMESPACE::ImageDesc.


The documentation for this class was generated from the following file: