Interface IImageVisitorAsync
A visitor to implement a double-dispatch pattern in order to apply pixel-specific operations on non-generic Image instances.
Namespace: SixLabors.ImageSharp.Advanced
Assembly: SixLabors.ImageSharp.dll
Syntax
public interface IImageVisitorAsync
Methods
| Improve this Doc View SourceVisitAsync<TPixel>(Image<TPixel>, CancellationToken)
Provides a pixel-specific implementation for a given operation.
Declaration
Task VisitAsync<TPixel>(Image<TPixel> image, CancellationToken cancellationToken)
where TPixel : struct, IPixel<TPixel>
Parameters
| Type | Name | Description |
|---|---|---|
| Image<TPixel> | image | The image. |
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
Type Parameters
| Name | Description |
|---|---|
| TPixel | The pixel type. |