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.htmlhttp://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html
Methods
| Edit this page 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(float)
Compresses an uncompanded channel (linear) to its nonlinear equivalent.
Declaration
public static float Compress(float channel)
Parameters
Type | Name | Description |
---|---|---|
float | channel | The channel value. |
Returns
Type | Description |
---|---|
float | The float 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(float)
Expands a companded channel to its linear equivalent with respect to the energy.
Declaration
public static float Expand(float channel)
Parameters
Type | Name | Description |
---|---|---|
float | channel | The channel value. |
Returns
Type | Description |
---|---|
float | The float 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. |