Color space definition. More...
#include <ColorSpace.hpp>
Public Types | |
enum | Enum { value_ANY, value_SAME, value_gray, value_RGB, value_CMY, value_CMYK, value_XYZ, value_Lab, value_YUV, value_HLS, value_HSV } |
Enumeration identifying a color space. | |
Public Member Functions | |
ColorSpace () | |
Default constructor. More... | |
ColorSpace (const ColorSpace &other)=default | |
Default copy constructor. | |
ColorSpace & | operator= (const ColorSpace &other)=default |
Default assignment operator. | |
bool | operator== (const ColorSpace &other) const |
Equality operator. | |
bool | operator!= (const ColorSpace &other) const |
Inequality operator. | |
constexpr | operator Enum () const |
Conversion operator to ColorSpace::Enum. More... | |
constexpr int | requiredBands () const |
Get the minimal number of bands for the colorspace. More... | |
constexpr cmsUInt32Number | cmsFormatter () const |
Get LittleCMS 2 formatter. More... | |
Protected Member Functions | |
constexpr | ColorSpace (const Enum v, const unsigned int bands, const cmsUInt32Number formatter) |
Protected constructor used by ColorSpaceEnum to create a list of supported color spaces. | |
Friends | |
class | ColorSpaceEnum |
Color space definition.
The class defines a color space in FotoSHOCK. It can be used to obtain some information about each specific colorspace, like the number of bands the colorspace requires, or the LittleCMS 2 formatter.
The colorspace doesn't handle alpha channel. The alpha channel is handled by the PixelData class as an extra channel.
All supported color spaces are defined as constant expressions in ColorSpaceEnum.
|
inline |
Default constructor.
Creates "RGB" ColorSpace object.
|
inline |
Get LittleCMS 2 formatter.
|
inline |
Conversion operator to ColorSpace::Enum.
This operator allows the constant expressions of type ColorSpace to be used in place of the ColorSpace::Enum
|
inline |
Get the minimal number of bands for the colorspace.