MasteringDisplayColorVolume Class

An immutable mastering display color volume (SMPTE ST 2086, the mdcv box of ISO/IEC 14496-12): the color primaries, the white point and the luminance range of the display on which high dynamic range content was mastered.

public sealed class MasteringDisplayColorVolume : IEquatable<MasteringDisplayColorVolume>

Remarks

The values are kept as the integers the file stores, so that a description round-trips unchanged: chromaticity coordinates in units of 0.00002 (50,000 is 1.0) and luminances in units of 0.0001 candela per square meter. Every value is accepted, the ones a display cannot have included.

This is a label: it describes the display the content was graded on, not the color space of the pixels (ImageMetadata.Cicp or ImageMetadata.IccProfile does), and no operation computes it.

Implements

Constructors

NameDescription
MasteringDisplayColorVolume(ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, uint, uint)Initializes a new instance of the MasteringDisplayColorVolume class.

MasteringDisplayColorVolume(ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, uint, uint)

MasteringDisplayColorVolume.cs

Initializes a new instance of the MasteringDisplayColorVolume class.

public MasteringDisplayColorVolume(ushort redX, ushort redY, ushort greenX, ushort greenY, ushort blueX, ushort blueY, ushort whitePointX, ushort whitePointY, uint maxLuminance, uint minLuminance)

Parameters

redX ushort
The x chromaticity coordinate of the red primary, in units of 0.00002.
redY ushort
The y chromaticity coordinate of the red primary, in units of 0.00002.
greenX ushort
The x chromaticity coordinate of the green primary, in units of 0.00002.
greenY ushort
The y chromaticity coordinate of the green primary, in units of 0.00002.
blueX ushort
The x chromaticity coordinate of the blue primary, in units of 0.00002.
blueY ushort
The y chromaticity coordinate of the blue primary, in units of 0.00002.
whitePointX ushort
The x chromaticity coordinate of the white point, in units of 0.00002.
whitePointY ushort
The y chromaticity coordinate of the white point, in units of 0.00002.
maxLuminance uint
The nominal maximum luminance of the display, in units of 0.0001 candela per square meter.
minLuminance uint
The nominal minimum luminance of the display, in units of 0.0001 candela per square meter.

Properties

NameDescription
BlueXGets the x chromaticity coordinate of the blue primary, in units of 0.00002.
BlueYGets the y chromaticity coordinate of the blue primary, in units of 0.00002.
GreenXGets the x chromaticity coordinate of the green primary, in units of 0.00002.
GreenYGets the y chromaticity coordinate of the green primary, in units of 0.00002.
MaxLuminanceGets the nominal maximum luminance of the display, in units of 0.0001 candela per square meter.
MaxLuminanceCandelasPerSquareMeterGets the nominal maximum luminance of the display, in candelas per square meter.
MinLuminanceGets the nominal minimum luminance of the display, in units of 0.0001 candela per square meter.
MinLuminanceCandelasPerSquareMeterGets the nominal minimum luminance of the display, in candelas per square meter.
RedXGets the x chromaticity coordinate of the red primary, in units of 0.00002.
RedYGets the y chromaticity coordinate of the red primary, in units of 0.00002.
WhitePointXGets the x chromaticity coordinate of the white point, in units of 0.00002.
WhitePointYGets the y chromaticity coordinate of the white point, in units of 0.00002.

Gets the x chromaticity coordinate of the blue primary, in units of 0.00002.

public ushort BlueX { get; }

Property value

ushort

Gets the y chromaticity coordinate of the blue primary, in units of 0.00002.

public ushort BlueY { get; }

Property value

ushort

Gets the x chromaticity coordinate of the green primary, in units of 0.00002.

public ushort GreenX { get; }

Property value

ushort

Gets the y chromaticity coordinate of the green primary, in units of 0.00002.

public ushort GreenY { get; }

Property value

ushort

Gets the nominal maximum luminance of the display, in units of 0.0001 candela per square meter.

public uint MaxLuminance { get; }

Property value

uint

MaxLuminanceCandelasPerSquareMeter

MasteringDisplayColorVolume.cs

Gets the nominal maximum luminance of the display, in candelas per square meter.

public double MaxLuminanceCandelasPerSquareMeter { get; }

Property value

double

Gets the nominal minimum luminance of the display, in units of 0.0001 candela per square meter.

public uint MinLuminance { get; }

Property value

uint

MinLuminanceCandelasPerSquareMeter

MasteringDisplayColorVolume.cs

Gets the nominal minimum luminance of the display, in candelas per square meter.

public double MinLuminanceCandelasPerSquareMeter { get; }

Property value

double

Gets the x chromaticity coordinate of the red primary, in units of 0.00002.

public ushort RedX { get; }

Property value

ushort

Gets the y chromaticity coordinate of the red primary, in units of 0.00002.

public ushort RedY { get; }

Property value

ushort

Gets the x chromaticity coordinate of the white point, in units of 0.00002.

public ushort WhitePointX { get; }

Property value

ushort

Gets the y chromaticity coordinate of the white point, in units of 0.00002.

public ushort WhitePointY { get; }

Property value

ushort

Methods

NameDescription
Equals(MasteringDisplayColorVolume?)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(MasteringDisplayColorVolume?)

MasteringDisplayColorVolume.cs

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

public bool Equals(MasteringDisplayColorVolume? other)
Parameters
other MasteringDisplayColorVolume?
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.