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 OpacityExtensions
Methods
| Edit this page View SourceOpacity(IImageProcessingContext, float)
Multiplies the alpha component of the image.
Declaration
public static IImageProcessingContext Opacity(this IImageProcessingContext source, float amount)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The current image processing context. |
| float | amount | The proportion of the conversion. Must be between 0 and 1. |
Returns
| Type | Description |
|---|---|
| IImageProcessingContext |
Opacity(IImageProcessingContext, float, 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 current image processing context. |
| float | 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 |