Class SRgbCompanding
Implements sRGB companding.
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces.Companding
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class SRgbCompanding
Remarks
For more info see: http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html
Methods
| Improve this Doc View SourceCompress(ref Vector4)
Compresses an uncompanded vector (linear) to its nonlinear equivalent.
Declaration
public static void Compress(ref Vector4 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector. |
Compress(Single)
Compresses an uncompanded channel (linear) to its nonlinear equivalent.
Declaration
public static float Compress(float channel)
Parameters
Type | Name | Description |
---|---|---|
Single | channel | The channel value. |
Returns
Type | Description |
---|---|
Single | The Single representing the nonlinear channel value. |
Compress(Span<Vector4>)
Compresses the uncompanded vectors to their nonlinear equivalents with respect to the energy.
Declaration
public static void Compress(Span<Vector4> vectors)
Parameters
Type | Name | Description |
---|---|---|
Span<Vector4> | vectors | The span of vectors. |
Expand(ref Vector4)
Expands a companded vector to its linear equivalent with respect to the energy.
Declaration
public static void Expand(ref Vector4 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector. |
Expand(Single)
Expands a companded channel to its linear equivalent with respect to the energy.
Declaration
public static float Expand(float channel)
Parameters
Type | Name | Description |
---|---|---|
Single | channel | The channel value. |
Returns
Type | Description |
---|---|
Single | The Single representing the linear channel value. |
Expand(Span<Vector4>)
Expands the companded vectors to their linear equivalents with respect to the energy.
Declaration
public static void Expand(Span<Vector4> vectors)
Parameters
Type | Name | Description |
---|---|---|
Span<Vector4> | vectors | The span of vectors. |