Class SaturateExtensions
Defines extensions that allow the alteration of the saturation component of an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class SaturateExtensionsMethods
| Improve this Doc View SourceSaturate(IImageProcessingContext, Single)
Alters the saturation component of the image.
Declaration
public static IImageProcessingContext Saturate(this IImageProcessingContext source, float amount)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageProcessingContext | source | The image this method extends. | 
| Single | amount | The proportion of the conversion. Must be greater than or equal to 0. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. | 
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
Saturate(IImageProcessingContext, Single, Rectangle)
Alters the saturation component of the image.
Declaration
public static IImageProcessingContext Saturate(this IImageProcessingContext source, float amount, Rectangle rectangle)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageProcessingContext | source | The image this method extends. | 
| Single | amount | The proportion of the conversion. Must be greater than or equal to 0. | 
| Rectangle | rectangle | The Rectangle structure that specifies the portion of the image object to alter. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. | 
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