Class GammaCompanding
Implements gamma companding.
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces.Companding
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class GammaCompanding
Remarks
http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html
Methods
| Edit this page View SourceCompress(float, float)
Compresses an uncompanded channel (linear) to its nonlinear equivalent.
Declaration
public static float Compress(float channel, float gamma)
Parameters
Type | Name | Description |
---|---|---|
float | channel | The channel value. |
float | gamma | The gamma value. |
Returns
Type | Description |
---|---|
float | The float representing the nonlinear channel value. |
Expand(float, float)
Expands a companded channel to its linear equivalent with respect to the energy.
Declaration
public static float Expand(float channel, float gamma)
Parameters
Type | Name | Description |
---|---|---|
float | channel | The channel value. |
float | gamma | The gamma value. |
Returns
Type | Description |
---|---|
float | The float representing the linear channel value. |