Table of Contents

Class CompandingUtilities

Namespace
SixLabors.ImageSharp.ColorProfiles.Companding
Assembly
SixLabors.ImageSharp.dll

Companding utilities that allow the accelerated compression-expansion of color channels.

public static class CompandingUtilities
Inheritance
CompandingUtilities
Inherited Members

Methods

Compand(Vector4, float[])

Performs the companding operation on the given vector using the given table.

public static Vector4 Compand(Vector4 vector, float[] table)

Parameters

vector Vector4

The vector.

table float[]

The lookup table.

Returns

Vector4

The Vector4

Compand(Span<Vector4>, float[])

Performs the companding operation on the given vectors using the given table.

public static void Compand(Span<Vector4> vectors, float[] table)

Parameters

vectors Span<Vector4>

The span of vectors.

table float[]

The lookup table.

GetCompressLookupTable<T>(Func<double, double, double>, double)

Lazily creates and stores a companding compression lookup table using the given function and modifier.

public static float[] GetCompressLookupTable<T>(Func<double, double, double> compandingFunction, double modifier = 0)

Parameters

compandingFunction Func<double, double, double>

The companding function.

modifier double

A modifier to pass to the function.

Returns

float[]

The float array.

Type Parameters

T

The type of companding function.

GetExpandLookupTable<T>(Func<double, double, double>, double)

Lazily creates and stores a companding expanding lookup table using the given function and modifier.

public static float[] GetExpandLookupTable<T>(Func<double, double, double> compandingFunction, double modifier = 0)

Parameters

compandingFunction Func<double, double, double>

The companding function.

modifier double

A modifier to pass to the function.

Returns

float[]

The float array.

Type Parameters

T

The type of companding function.