![]() |
Om
1.0.0
A universal framework for multimedia simulation
|
A class that describes the storage format for an image pixel. More...
#include <omImagePixelFormat.h>
Public Member Functions | |
| PixelFormat () | |
| Create a default pixel format with no channels. More... | |
| PixelFormat (const ColorSpace &newColorSpace) | |
| Create a pixel format object that corresponds to the default format for the given color space. More... | |
| PixelFormat (const ColorSpace &newColorSpace, const ChannelInfo &channel0) | |
| Create a 1-channl pixel format object with the given color space and channel information. More... | |
| PixelFormat (const ColorSpace &newColorSpace, const ChannelInfo &channel0, const ChannelInfo &channel1) | |
| Create a 2-channl pixel format object with the given color space and channel information. More... | |
| PixelFormat (const ColorSpace &newColorSpace, const ChannelInfo &channel0, const ChannelInfo &channel1, const ChannelInfo &channel2) | |
| Create a 3-channl pixel format object with the given color space and channel information. More... | |
| PixelFormat (const ColorSpace &newColorSpace, const ChannelInfo &channel0, const ChannelInfo &channel1, const ChannelInfo &channel2, const ChannelInfo &channel3) | |
| Create a 4-channl pixel format object with the given color space and channel information. More... | |
| Size | getSizeInBits () const |
| Get the number of bits required for each pixel of this pixel format. More... | |
| Size | getSizeInBytes () const |
| Get the number of bytes required for each pixel of this pixel format. More... | |
| ChannelInfo & | getChannelInfo (Index channelIndex) |
| Return information about the channel at the given index. More... | |
| const ChannelInfo & | getChannelInfo (Index channelIndex) const |
| Return information about the channel at the given index. More... | |
| void | setChannelInfo (Index channelIndex, const ChannelInfo &newChannelInfo) |
| Set information about the channel at the given index. More... | |
| const ChannelType & | getChannelType (Index channelIndex) const |
| Return the semantic type of the channel at the given index. More... | |
| void | setChannelType (Index channelIndex, const ChannelType &newChannelType) |
| Set the semantic type of the channel at the given index. More... | |
| const ScalarType & | getChannelStorageType (Index channelIndex) const |
| Return the primitive type of the storage for the channel at the given index. More... | |
| void | setChannelStorageType (Index channelIndex, const ScalarType &newScalarType) |
| Set the primitive type of the storage for the channel at the given index. More... | |
| Size | getChannelSizeInBits (Index channelIndex) const |
| Get the size in bits for each channel of this pixel format. More... | |
| Size | getChannelSizeInBytes (Index channelIndex) const |
| Get the size in bytes for each channel of this pixel format. More... | |
| Size | getChannelCount () const |
| Return the number of channels that this pixel format has. More... | |
| void | addChannel (const ChannelInfo &channelInfo) |
| Add a new channel to the end of this image pixel format. More... | |
| void | clearChannels () |
| Remove all channels from this pixel format. More... | |
| const ColorSpace & | getColorSpace () const |
| Return the color space of this pixel format. More... | |
| void | setColorSpace (const ColorSpace &newColorSpace) |
| Set the color space of this pixel format. More... | |
| Bool | hasAlpha () const |
| Return whether or not this pixel format has an alpha (transparency) channel. More... | |
| Bool | operator== (const PixelFormat &other) const |
| Return whether or not this pixel format is the same as another. More... | |
| Bool | operator!= (const PixelFormat &other) const |
| Return whether or not this pixel format is not the same as another. More... | |
| String | toString () const |
| Return a string representation of the pixel format. More... | |
| operator String () const | |
| Convert this pixel format into a string representation. More... | |
Static Public Attributes | |
| static const PixelFormat | UNDEFINED |
| An undefined pixel format. More... | |
| static const PixelFormat | RGB8 |
| An RGB pixel format with 8 bits per component. More... | |
| static const PixelFormat | RGB16 |
| An RGB pixel format with 16 bits per component. More... | |
| static const PixelFormat | RGB16F |
| An RGB pixel format with 16 floating-point bits per component. More... | |
| static const PixelFormat | RGB32F |
| An RGB pixel format with 32 floating-point bits per component. More... | |
| static const PixelFormat | RGBA8 |
| An RGBA pixel format with 8 bits per component. More... | |
| static const PixelFormat | RGBA16 |
| An RGBA pixel format with 16 bits per component. More... | |
| static const PixelFormat | RGBA16F |
| An RGBA pixel format with 16 floating-point bits per component. More... | |
| static const PixelFormat | RGBA32F |
| An RGBA pixel format with 32 floating-point bits per component. More... | |
| static const PixelFormat | GRAY8 |
| A 1-channel pixel format with 8 bits per component. More... | |
| static const PixelFormat | GRAY16 |
| A 1-channel pixel format with 16 bits per component. More... | |
| static const PixelFormat | GRAY16F |
| A 1-channel pixel format with 16 floating-point bits per component. More... | |
| static const PixelFormat | GRAY32F |
| A 1-channel pixel format with 32 floating-point bits per component. More... | |
| static const PixelFormat | GRAY_ALPHA8 |
| A 2-channel pixel format with 8 bits per component. More... | |
| static const PixelFormat | GRAY_ALPHA16 |
| A 2-channel pixel format with 16 bits per component. More... | |
| static const PixelFormat | GRAY_ALPHA16F |
| A 2-channel pixel format with 16 floating-point bits per component. More... | |
| static const PixelFormat | GRAY_ALPHA32F |
| A 2-channel pixel format with 32 floating-point bits per component. More... | |
| static const PixelFormat | CMYK8 |
| An CMYK pixel format with 8 bits per component. More... | |
| static const PixelFormat | CMYK16 |
| An CMYK pixel format with 16 bits per component. More... | |
| static const PixelFormat | CMYK16F |
| An CMYK pixel format with 16 floating-point bits per component. More... | |
| static const PixelFormat | CMYK32F |
| An CMYK pixel format with 32 floating-point bits per component. More... | |
A class that describes the storage format for an image pixel.
|
inline |
Create a default pixel format with no channels.
| om::images::base::PixelFormat::PixelFormat | ( | const ColorSpace & | newColorSpace | ) |
Create a pixel format object that corresponds to the default format for the given color space.
| om::images::base::PixelFormat::PixelFormat | ( | const ColorSpace & | newColorSpace, |
| const ChannelInfo & | channel0 | ||
| ) |
Create a 1-channl pixel format object with the given color space and channel information.
| om::images::base::PixelFormat::PixelFormat | ( | const ColorSpace & | newColorSpace, |
| const ChannelInfo & | channel0, | ||
| const ChannelInfo & | channel1 | ||
| ) |
Create a 2-channl pixel format object with the given color space and channel information.
| om::images::base::PixelFormat::PixelFormat | ( | const ColorSpace & | newColorSpace, |
| const ChannelInfo & | channel0, | ||
| const ChannelInfo & | channel1, | ||
| const ChannelInfo & | channel2 | ||
| ) |
Create a 3-channl pixel format object with the given color space and channel information.
| om::images::base::PixelFormat::PixelFormat | ( | const ColorSpace & | newColorSpace, |
| const ChannelInfo & | channel0, | ||
| const ChannelInfo & | channel1, | ||
| const ChannelInfo & | channel2, | ||
| const ChannelInfo & | channel3 | ||
| ) |
Create a 4-channl pixel format object with the given color space and channel information.
|
inline |
Get the number of bits required for each pixel of this pixel format.
| Size om::images::base::PixelFormat::getSizeInBytes | ( | ) | const |
Get the number of bytes required for each pixel of this pixel format.
|
inline |
Return information about the channel at the given index.
|
inline |
Return information about the channel at the given index.
|
inline |
Set information about the channel at the given index.
|
inline |
Return the semantic type of the channel at the given index.
|
inline |
Set the semantic type of the channel at the given index.
|
inline |
Return the primitive type of the storage for the channel at the given index.
|
inline |
Set the primitive type of the storage for the channel at the given index.
Get the size in bits for each channel of this pixel format.
Channel indices start at 0 and go up to N-1 for N channels. If the specified channel index is outside of the valid range, size of 0 will be returned.
Get the size in bytes for each channel of this pixel format.
Channel indices start at 0 and go up to N-1 for N channels. If the specified channel index is outside of the valid range, size of 0 will be returned.
|
inline |
Return the number of channels that this pixel format has.
| void om::images::base::PixelFormat::addChannel | ( | const ChannelInfo & | channelInfo | ) |
Add a new channel to the end of this image pixel format.
| void om::images::base::PixelFormat::clearChannels | ( | ) |
Remove all channels from this pixel format.
|
inline |
Return the color space of this pixel format.
|
inline |
Set the color space of this pixel format.
| Bool om::images::base::PixelFormat::hasAlpha | ( | ) | const |
Return whether or not this pixel format has an alpha (transparency) channel.
| Bool om::images::base::PixelFormat::operator== | ( | const PixelFormat & | other | ) | const |
Return whether or not this pixel format is the same as another.
|
inline |
Return whether or not this pixel format is not the same as another.
| String om::images::base::PixelFormat::toString | ( | ) | const |
Return a string representation of the pixel format.
|
inline |
Convert this pixel format into a string representation.
|
static |
An undefined pixel format.
|
static |
An RGB pixel format with 8 bits per component.
|
static |
An RGB pixel format with 16 bits per component.
|
static |
An RGB pixel format with 16 floating-point bits per component.
|
static |
An RGB pixel format with 32 floating-point bits per component.
|
static |
An RGBA pixel format with 8 bits per component.
|
static |
An RGBA pixel format with 16 bits per component.
|
static |
An RGBA pixel format with 16 floating-point bits per component.
|
static |
An RGBA pixel format with 32 floating-point bits per component.
|
static |
A 1-channel pixel format with 8 bits per component.
|
static |
A 1-channel pixel format with 16 bits per component.
|
static |
A 1-channel pixel format with 16 floating-point bits per component.
|
static |
A 1-channel pixel format with 32 floating-point bits per component.
|
static |
A 2-channel pixel format with 8 bits per component.
|
static |
A 2-channel pixel format with 16 bits per component.
|
static |
A 2-channel pixel format with 16 floating-point bits per component.
|
static |
A 2-channel pixel format with 32 floating-point bits per component.
|
static |
An CMYK pixel format with 8 bits per component.
|
static |
An CMYK pixel format with 16 bits per component.
|
static |
An CMYK pixel format with 16 floating-point bits per component.
|
static |
An CMYK pixel format with 32 floating-point bits per component.
1.8.11