Table of Contents

Struct PixelAccessor<TPixel>

Namespace
SixLabors.ImageSharp
Assembly
SixLabors.ImageSharp.dll

Provides efficient access the pixel buffers of an Image<TPixel>.

public ref struct PixelAccessor<TPixel> where TPixel : unmanaged, IPixel<TPixel>

Type Parameters

TPixel

The pixel type.

Inherited Members

Properties

Height

Gets the height of the backing Image<TPixel>.

public int Height { get; }

Property Value

int

Width

Gets the width of the backing Image<TPixel>.

public int Width { get; }

Property Value

int

Methods

GetRowSpan(int)

Gets the representation of the pixels as a Span<T> of contiguous memory at row rowIndex beginning from the first pixel on that row.

public Span<TPixel> GetRowSpan(int rowIndex)

Parameters

rowIndex int

The row index.

Returns

Span<TPixel>

The Span<T>.

Exceptions

ArgumentOutOfRangeException

Thrown when row index is out of range.