Struct YCbCr
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/YCbCrhttp://www.ijg.org/files/T-REC-T.871-201105-I!!PDF-E.pdf
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct YCbCr : IEquatable<YCbCr>
Constructors
| Edit this page View SourceYCbCr(Vector3)
Initializes a new instance of the YCbCr struct.
Declaration
public YCbCr(Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the y, cb, cr components. |
YCbCr(float, float, float)
Initializes a new instance of the YCbCr struct.
Declaration
public YCbCr(float y, float cb, float cr)
Parameters
Type | Name | Description |
---|---|---|
float | y | The y luminance component. |
float | cb | The cb chroma component. |
float | cr | The cr chroma component. |
Properties
| Edit this page View SourceCb
Gets the Cb chroma component.
Declaration
public float Cb { get; }
Property Value
Type | Description |
---|---|
float |
Cr
Gets the Cr chroma component.
Declaration
public float Cr { get; }
Property Value
Type | Description |
---|---|
float |
Y
Gets the Y luminance component.
Declaration
public float Y { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(YCbCr)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(YCbCr other)
Parameters
Type | Name | Description |
---|---|---|
YCbCr | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceoperator ==(YCbCr, YCbCr)
Compares two YCbCr objects for equality.
Declaration
public static bool operator ==(YCbCr left, YCbCr right)
Parameters
Type | Name | Description |
---|---|---|
YCbCr | left | The YCbCr on the left side of the operand. |
YCbCr | right | The YCbCr on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is equal to the |
operator !=(YCbCr, YCbCr)
Compares two YCbCr objects for inequality.
Declaration
public static bool operator !=(YCbCr left, YCbCr right)
Parameters
Type | Name | Description |
---|---|---|
YCbCr | left | The YCbCr on the left side of the operand. |
YCbCr | right | The YCbCr on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is unequal to the |