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
Width
Gets the width of the backing Image<TPixel>.
public int Width { get; }
Property Value
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
intThe row index.
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when row index is out of range.