Struct YCbCr
- Namespace
- SixLabors.ImageSharp.ColorSpaces
- Assembly
- SixLabors.ImageSharp.dll
Represents an YCbCr (luminance, blue chroma, red chroma) color as defined in the ITU-T T.871 specification for the JFIF use with Jpeg. http://en.wikipedia.org/wiki/YCbCr http://www.ijg.org/files/T-REC-T.871-201105-I!!PDF-E.pdf
public readonly struct YCbCr : IEquatable<YCbCr>
- Implements
- Inherited Members
Constructors
YCbCr(Vector3)
Initializes a new instance of the YCbCr struct.
public YCbCr(Vector3 vector)
Parameters
vectorVector3The vector representing the y, cb, cr components.
YCbCr(float, float, float)
Initializes a new instance of the YCbCr struct.
public YCbCr(float y, float cb, float cr)
Parameters
yfloatThe y luminance component.
cbfloatThe cb chroma component.
crfloatThe cr chroma component.
Properties
Cb
Gets the Cb chroma component.
public float Cb { get; }
Property Value
Cr
Gets the Cr chroma component.
public float Cr { get; }
Property Value
Y
Gets the Y luminance component.
public float Y { get; }
Property Value
Methods
Equals(YCbCr)
public bool Equals(YCbCr other)
Parameters
otherYCbCr
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(YCbCr, YCbCr)
Compares two YCbCr objects for equality.
public static bool operator ==(YCbCr left, YCbCr right)
Parameters
leftYCbCrThe YCbCr on the left side of the operand.
rightYCbCrThe YCbCr on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(YCbCr, YCbCr)
Compares two YCbCr objects for inequality.
public static bool operator !=(YCbCr left, YCbCr right)
Parameters
leftYCbCrThe YCbCr on the left side of the operand.
rightYCbCrThe YCbCr on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.