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
vector
Vector3The 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
y
floatThe y luminance component.
cb
floatThe cb chroma component.
cr
floatThe 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
other
YCbCr
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
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
left
YCbCrThe YCbCr on the left side of the operand.
right
YCbCrThe YCbCr on the right side of the operand.
Returns
- bool
True if the current left is equal to the
right
parameter; otherwise, false.
operator !=(YCbCr, YCbCr)
Compares two YCbCr objects for inequality.
public static bool operator !=(YCbCr left, YCbCr right)
Parameters
left
YCbCrThe YCbCr on the left side of the operand.
right
YCbCrThe YCbCr on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
right
parameter; otherwise, false.