C# Class SparrowSharp.Filters.ColorMatrix

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

Méthodes publiques

Свойство Type Description
NumValues int

Protected Properties

Свойство Type Description
_m float[]

Méthodes publiques

Méthode 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

Méthode Description
ConcatMatrix ( ColorMatrix target, float source ) : void

Method Details

AdjustBrightness() public méthode

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
Résultat void

AdjustContrast() public méthode

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
Résultat void

AdjustHue() public méthode

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

AdjustSaturation() public méthode

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
Résultat void

ColorMatrix() public méthode

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
Résultat System

ConcatColorMatrix() public méthode

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

Identity() public méthode

Changes the color matrix into an identity matrix.
public Identity ( ) : void
Résultat void

Invert() public méthode

Inverts the colors.
public Invert ( ) : void
Résultat void

Property Details

NumValues public_oe property

Returns the count of values (always 20).
public int NumValues
Résultat int

_m protected_oe property

protected float[] _m
Résultat float[]