CicpColorDescription Class

An immutable set of coding-independent code points (ITU-T H.273, ISO/IEC 23091-2) that describes how the color samples of an image are to be interpreted: color primaries, transfer characteristics, matrix coefficients and sample range.

public sealed class CicpColorDescription : IEquatable<CicpColorDescription>

Remarks

The color primaries and the transfer characteristics are labels: no operation converts the pixels, and high dynamic range content (for example PQ, 16, or HLG, 18) is decoded to its coded sample values.

The matrix coefficients and the range describe the encoded source and are already applied by the decoder: decoded pixels are always full-range R'G'B' or luma samples.

Every code point from 0 to 255 is accepted, reserved values included, so that a description round-trips unchanged.

Implements

Constructors

NameDescription
CicpColorDescription(byte, byte, byte, bool)Initializes a new instance of the CicpColorDescription class.

CicpColorDescription(byte, byte, byte, bool)

CicpColorDescription.cs

Initializes a new instance of the CicpColorDescription class.

public CicpColorDescription(byte colorPrimaries, byte transferCharacteristics, byte matrixCoefficients, bool fullRange)

Parameters

colorPrimaries byte
The color primaries code point.
transferCharacteristics byte
The transfer characteristics code point.
matrixCoefficients byte
The matrix coefficients code point of the encoded source.
fullRange bool
true when the encoded source uses the full sample range.

Properties

NameDescription
ColorPrimariesGets the color primaries code point (for example 1 for BT.709 and sRGB, 9 for BT.2020, 12 for Display P3). A label: never applied.
FullRangeGets a value indicating whether the encoded source uses the full sample range. Already applied by the decoder: decoded samples are always full range.
MatrixCoefficientsGets the matrix coefficients code point of the encoded source (for example 0 for identity, 1 for BT.709, 6 for BT.601). Already applied by the decoder.
TransferCharacteristicsGets the transfer characteristics code point (for example 13 for sRGB, 8 for linear, 16 for PQ, 18 for HLG). A label: never applied.

Gets the color primaries code point (for example 1 for BT.709 and sRGB, 9 for BT.2020, 12 for Display P3). A label: never applied.

public byte ColorPrimaries { get; }

Property value

byte

Gets a value indicating whether the encoded source uses the full sample range. Already applied by the decoder: decoded samples are always full range.

public bool FullRange { get; }

Property value

bool

MatrixCoefficients

CicpColorDescription.cs

Gets the matrix coefficients code point of the encoded source (for example 0 for identity, 1 for BT.709, 6 for BT.601). Already applied by the decoder.

public byte MatrixCoefficients { get; }

Property value

byte

TransferCharacteristics

CicpColorDescription.cs

Gets the transfer characteristics code point (for example 13 for sRGB, 8 for linear, 16 for PQ, 18 for HLG). A label: never applied.

public byte TransferCharacteristics { get; }

Property value

byte

Methods

NameDescription
Equals(CicpColorDescription?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
GetHashCode()Serves as the default hash function.
ToString()Returns a string that represents the current object.

Equals overloads

Equals(CicpColorDescription?)

CicpColorDescription.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CicpColorDescription? other)
Parameters
other CicpColorDescription?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current object.
Returns

bool true if the specified object is equal to the current object; otherwise, false.

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.