C# Класс ImageProcessor.Imaging.Helpers.PixelOperations

Performs per-pixel operations.
Показать файл Открыть проект

Открытые методы

Метод Описание
Gamma ( Color color, float value ) : Color

Returns the given color adjusted by the given gamma value.

ToGammaFromLinear ( Color composite ) : Color

Converts an pixel from a linear color-space to the equivalent gamma color-space.

ToLinear ( Color composite ) : Color

Converts an pixel from an sRGB color-space to the equivalent linear color-space.

ToLinearFromGamma ( Color composite ) : Color

Converts an pixel from a gamma color-space to the equivalent linear color-space.

ToSRGB ( Color linear ) : Color

Converts an image from a linear color-space to the equivalent sRGB color-space.

Приватные методы

Метод Описание
GetGammaLinearBytes ( ) : byte[]

Gets an array of bytes representing each possible value of color component converted from linear to the gamma color space.

GetLinearBytes ( ) : byte[]

Gets an array of bytes representing each possible value of color component converted from sRGB to the linear color space.

GetLinearGammaBytes ( ) : byte[]

Gets an array of bytes representing each possible value of color component converted from gamma to the linear color space.

GetSRGBBytes ( ) : byte[]

Gets an array of bytes representing each possible value of color component converted from linear to the sRGB color space.

LinearToSRGB ( float signal ) : float

Gets the correct sRGB value from an linear signal.

SRGBToLinear ( float signal ) : float

Gets the correct linear value from an sRGB signal.

Описание методов

Gamma() публичный статический Метод

Returns the given color adjusted by the given gamma value.
/// Thrown if the given gamma value is out with the acceptable range. ///
public static Gamma ( Color color, float value ) : Color
color Color /// The to adjust. ///
value float /// The gamma value - Between .1 and 5. ///
Результат Color

ToGammaFromLinear() публичный статический Метод

Converts an pixel from a linear color-space to the equivalent gamma color-space.
public static ToGammaFromLinear ( Color composite ) : Color
composite Color /// The to convert. ///
Результат Color

ToLinear() публичный статический Метод

Converts an pixel from an sRGB color-space to the equivalent linear color-space.
public static ToLinear ( Color composite ) : Color
composite Color /// The to convert. ///
Результат Color

ToLinearFromGamma() публичный статический Метод

Converts an pixel from a gamma color-space to the equivalent linear color-space.
public static ToLinearFromGamma ( Color composite ) : Color
composite Color /// The to convert. ///
Результат Color

ToSRGB() публичный статический Метод

Converts an image from a linear color-space to the equivalent sRGB color-space.
public static ToSRGB ( Color linear ) : Color
linear Color /// The to convert. ///
Результат Color