Table of Contents

Class GammaCompanding

Namespace
SixLabors.ImageSharp.ColorSpaces.Companding
Assembly
SixLabors.ImageSharp.dll

Implements gamma companding.

public static class GammaCompanding
Inheritance
GammaCompanding
Inherited Members

Remarks

Methods

Compress(float, float)

Compresses an uncompanded channel (linear) to its nonlinear equivalent.

public static float Compress(float channel, float gamma)

Parameters

channel float

The channel value.

gamma float

The gamma value.

Returns

float

The float representing the nonlinear channel value.

Expand(float, float)

Expands a companded channel to its linear equivalent with respect to the energy.

public static float Expand(float channel, float gamma)

Parameters

channel float

The channel value.

gamma float

The gamma value.

Returns

float

The float representing the linear channel value.