Class OpacityExtensions
Defines extensions that allow the alteration of the opacity component of an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class OpacityExtensionsMethods
| Improve this Doc View SourceOpacity(IImageProcessingContext, Single)
Multiplies the alpha component of the image.
Declaration
public static IImageProcessingContext Opacity(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 between 0 and 1. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. | 
Opacity(IImageProcessingContext, Single, Rectangle)
Multiplies the alpha component of the image.
Declaration
public static IImageProcessingContext Opacity(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 between 0 and 1. | 
| 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. |