Class KnownFilterMatrices
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
A collection of known ColorMatrix values for composing filters
public static class KnownFilterMatrices
- Inheritance
-
KnownFilterMatrices
- Inherited Members
Properties
AchromatomalyFilter
Gets a filter recreating Achromatomaly (Color desensitivity) color blindness
public static ColorMatrix AchromatomalyFilter { get; }
Property Value
AchromatopsiaFilter
Gets a filter recreating Achromatopsia (Monochrome) color blindness.
public static ColorMatrix AchromatopsiaFilter { get; }
Property Value
BlackWhiteFilter
Gets an approximated black and white filter
public static ColorMatrix BlackWhiteFilter { get; }
Property Value
DeuteranomalyFilter
Gets a filter recreating Deuteranomaly (Green-Weak) color blindness.
public static ColorMatrix DeuteranomalyFilter { get; }
Property Value
DeuteranopiaFilter
Gets a filter recreating Deuteranopia (Green-Blind) color blindness.
public static ColorMatrix DeuteranopiaFilter { get; }
Property Value
KodachromeFilter
Gets a filter recreating an old Kodachrome camera effect.
public static ColorMatrix KodachromeFilter { get; }
Property Value
LomographFilter
Gets a filter recreating an old Lomograph camera effect.
public static ColorMatrix LomographFilter { get; }
Property Value
PolaroidFilter
Gets a filter recreating an old Polaroid camera effect.
public static ColorMatrix PolaroidFilter { get; }
Property Value
ProtanomalyFilter
Gets a filter recreating Protanomaly (Red-Weak) color blindness.
public static ColorMatrix ProtanomalyFilter { get; }
Property Value
ProtanopiaFilter
Gets a filter recreating Protanopia (Red-Blind) color blindness.
public static ColorMatrix ProtanopiaFilter { get; }
Property Value
TritanomalyFilter
Gets a filter recreating Tritanomaly (Blue-Weak) color blindness.
public static ColorMatrix TritanomalyFilter { get; }
Property Value
TritanopiaFilter
Gets a filter recreating Tritanopia (Blue-Blind) color blindness.
public static ColorMatrix TritanopiaFilter { get; }
Property Value
Methods
CreateBrightnessFilter(float)
Create a brightness filter matrix using the given amount.
public static ColorMatrix CreateBrightnessFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be greater than or equal to 0.
Returns
Remarks
A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results.
CreateContrastFilter(float)
Create a contrast filter matrix using the given amount.
public static ColorMatrix CreateContrastFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be greater than or equal to 0.
Returns
Remarks
A value of 0 will create an image that is completely gray. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing results with more contrast.
CreateGrayscaleBt601Filter(float)
Create a grayscale filter matrix using the given amount using the formula as specified by ITU-R Recommendation BT.601. https://en.wikipedia.org/wiki/Luma_%28video%29#Rec._601_luma_versus_Rec._709_luma_coefficients
public static ColorMatrix CreateGrayscaleBt601Filter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be between 0 and 1.
Returns
CreateGrayscaleBt709Filter(float)
Create a grayscale filter matrix using the given amount using the formula as specified by ITU-R Recommendation BT.709. https://en.wikipedia.org/wiki/Rec._709#Luma_coefficients
public static ColorMatrix CreateGrayscaleBt709Filter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be between 0 and 1.
Returns
CreateHueFilter(float)
Create a hue filter matrix using the given angle in degrees.
public static ColorMatrix CreateHueFilter(float degrees)
Parameters
degrees
floatThe angle of rotation in degrees.
Returns
CreateInvertFilter(float)
Create an invert filter matrix using the given amount.
public static ColorMatrix CreateInvertFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be between 0 and 1.
Returns
CreateLightnessFilter(float)
Create a lightness filter matrix using the given amount.
public static ColorMatrix CreateLightnessFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be greater than or equal to 0.
Returns
Remarks
A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing lighter results.
CreateOpacityFilter(float)
Create an opacity filter matrix using the given amount.
public static ColorMatrix CreateOpacityFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be between 0 and 1.
Returns
CreateSaturateFilter(float)
Create a saturation filter matrix using the given amount.
public static ColorMatrix CreateSaturateFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be greater than or equal to 0.
Returns
Remarks
A value of 0 is completely un-saturated. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of amount over 1 are allowed, providing super-saturated results
CreateSepiaFilter(float)
Create a sepia filter matrix using the given amount. The formula used matches the svg specification. http://www.w3.org/TR/filter-effects/#sepiaEquivalent
public static ColorMatrix CreateSepiaFilter(float amount)
Parameters
amount
floatThe proportion of the conversion. Must be between 0 and 1.