Represents a color space with chromaticity coordinates and transfer functions. More...
#include <colorspace.h>
Classes | |
| struct | Data |
| Static data describing a color space. More... | |
Public Types | |
| enum | ID { Invalid = 0 , Rec709 , LinearRec709 , Rec601_PAL , LinearRec601_PAL , Rec601_NTSC , LinearRec601_NTSC } |
| Identifies a known color space. More... | |
| typedef double(* | TransformFunc) (double) |
| Function pointer type for electro-optical transfer functions. | |
| typedef std::array< CIEPoint, 4 > | Params |
| CIE chromaticity coordinates: red, green, blue primaries and white point. | |
Public Member Functions | |
| ColorSpace (ID id=Invalid) | |
| Constructs a ColorSpace from the given ID, defaulting to Invalid. | |
| const ID | id () const |
| Returns the color space ID. | |
| ColorSpace | inverseColorSpace () |
| Returns the inverse color space. | |
| const String | name () const |
| Returns the color space name. | |
| const String | desc () const |
| Returns the color space description. | |
| const CIEPoint & | red () const |
| Returns the red chromaticity coordinate. | |
| const CIEPoint & | green () const |
| Returns the green chromaticity coordinate. | |
| const CIEPoint & | blue () const |
| Returns the blue chromaticity coordinate. | |
| const CIEPoint & | whitePoint () const |
| Returns the white point chromaticity coordinate. | |
| double | transferFunc (double input) const |
| Applies the forward transfer function (OETF) to the given value. | |
| double | invtTransferFunc (double input) const |
| Applies the inverse transfer function (EOTF) to the given value. | |
Represents a color space with chromaticity coordinates and transfer functions.
Wraps a static lookup table of known color spaces (e.g. Rec. 709, Rec. 601) with their CIE chromaticity primaries, white point, and electro-optical / opto-electronic transfer functions.
Identifies a known color space.
| Enumerator | |
|---|---|
| Invalid | Invalid or unset color space. |
| Rec709 | ITU-R BT.709 (gamma-corrected). |
| LinearRec709 | ITU-R BT.709 (linear / scene-referred). |
| Rec601_PAL | ITU-R BT.601 PAL (gamma-corrected). |
| LinearRec601_PAL | ITU-R BT.601 PAL (linear). |
| Rec601_NTSC | ITU-R BT.601 NTSC (gamma-corrected). |
| LinearRec601_NTSC | ITU-R BT.601 NTSC (linear). |
Applies the inverse transfer function (EOTF) to the given value.
| input | The gamma-corrected value to linearize. |
Applies the forward transfer function (OETF) to the given value.
| input | The linear-light value to transform. |