C# Class SparrowSharp.Filters.ColorMatrix

A color matrix class containing an array of 20 floats arranged as a 4x5 matrix.
Datei anzeigen Open project: fmotagarcia/sparrow-sharp Class Usage Examples

Public Properties

Property Type Description
NumValues int

Protected Properties

Property Type Description
_m float[]

Public Methods

Method Description
AdjustBrightness ( float brightness ) : void

Changes the brightness. Typical values are in the range [-1, 1]. Values above zero will make the image brighter, values below zero will make it darker.

AdjustContrast ( float contrast ) : void

Changes the contrast. Typical values are in the range [-1, 1]. Values above zero will raise, values below zero will reduce the contrast.

AdjustHue ( float hue ) : void

Changes the hue. Typical values are in the range [-1, 1].

AdjustSaturation ( float saturation ) : void

Changes the saturation. Typical values are in the range [-1, 1]. Values above zero will raise, values below zero will reduce the saturation. '-1' will produce a grayscale image.

ColorMatrix ( float values = null ) : System

Initializes a color matrix with an array of 20 floats. If no value is specified it initializes with an identity matrix.

ConcatColorMatrix ( ColorMatrix colorMatrix ) : void

Concatenates the receiving color matrix with another one.

Identity ( ) : void

Changes the color matrix into an identity matrix.

Invert ( ) : void

Inverts the colors.

Private Methods

Method Description
ConcatMatrix ( ColorMatrix target, float source ) : void

Method Details

AdjustBrightness() public method

Changes the brightness. Typical values are in the range [-1, 1]. Values above zero will make the image brighter, values below zero will make it darker.
public AdjustBrightness ( float brightness ) : void
brightness float
return void

AdjustContrast() public method

Changes the contrast. Typical values are in the range [-1, 1]. Values above zero will raise, values below zero will reduce the contrast.
public AdjustContrast ( float contrast ) : void
contrast float
return void

AdjustHue() public method

Changes the hue. Typical values are in the range [-1, 1].
public AdjustHue ( float hue ) : void
hue float
return void

AdjustSaturation() public method

Changes the saturation. Typical values are in the range [-1, 1]. Values above zero will raise, values below zero will reduce the saturation. '-1' will produce a grayscale image.
public AdjustSaturation ( float saturation ) : void
saturation float
return void

ColorMatrix() public method

Initializes a color matrix with an array of 20 floats. If no value is specified it initializes with an identity matrix.
public ColorMatrix ( float values = null ) : System
values float
return System

ConcatColorMatrix() public method

Concatenates the receiving color matrix with another one.
public ConcatColorMatrix ( ColorMatrix colorMatrix ) : void
colorMatrix ColorMatrix
return void

Identity() public method

Changes the color matrix into an identity matrix.
public Identity ( ) : void
return void

Invert() public method

Inverts the colors.
public Invert ( ) : void
return void

Property Details

NumValues public_oe property

Returns the count of values (always 20).
public int NumValues
return int

_m protected_oe property

protected float[] _m
return float[]