Struct PixelAccessor<TPixel>
Provides efficient access the pixel buffers of an Image<TPixel>.
Inherited Members
Namespace: SixLabors.ImageSharp
Assembly: SixLabors.ImageSharp.dll
Syntax
public ref struct PixelAccessor<TPixel> where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |
Properties
| Edit this page View SourceHeight
Gets the height of the backing Image<TPixel>.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
int |
Width
Gets the width of the backing Image<TPixel>.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceGetRowSpan(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.
Declaration
public Span<TPixel> GetRowSpan(int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
int | rowIndex | The row index. |
Returns
Type | Description |
---|---|
Span<TPixel> | The Span<T>. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when row index is out of range. |