FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
FotoSHOCKcore::ColorSpace Class Reference

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.
 
ColorSpaceoperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

FotoSHOCKcore::ColorSpace::ColorSpace ( )
inline

Default constructor.

Creates "RGB" ColorSpace object.

Member Function Documentation

constexpr cmsUInt32Number FotoSHOCKcore::ColorSpace::cmsFormatter ( ) const
inline

Get LittleCMS 2 formatter.

Returns
the Colorspace part of the LittleCMS 2 formatter.
constexpr FotoSHOCKcore::ColorSpace::operator Enum ( ) const
inline

Conversion operator to ColorSpace::Enum.

This operator allows the constant expressions of type ColorSpace to be used in place of the ColorSpace::Enum

constexpr int FotoSHOCKcore::ColorSpace::requiredBands ( ) const
inline

Get the minimal number of bands for the colorspace.

Returns
number of bands required to store the color space.

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