IPixelRowOperation<TPixel> Interface

A custom image processor that edits each row of pixels in place, applied to every frame of an image by ImageProcessingExtensions.ApplyRowOperation.

public interface IPixelRowOperation<TPixel> where TPixel : unmanaged

Type parameters

TPixel
The pixel type of the rows: the pixel type of the image, or a wider working type.

Remarks

Implement the operation as a struct: the processing loop is then compiled for it, without an interface call per row. IPixelRowOperation<TPixel>.Invoke is called from several threads at once when ImageConfiguration.MaxDegreeOfParallelism is greater than 1, for different rows of the same instance: it must not change the state of the operation.

Methods

NameDescription
Invoke(int, Span<TPixel>)Edits one row.

Invoke(int, Span<TPixel>)

Edits one row.

void Invoke(int y, Span<TPixel> row)

Parameters

y int
The index of the row in the frame.
row Span<TPixel>
The pixels of the row, read and written in place. Valid until the method returns.