PixelAccessor<TPixel> Struct
- Obsolete: Types with embedded references are not supported in this version of your compiler.
Scoped access to the rows of a frame, valid only during a ImageFrame<TPixel>.ProcessPixelRows callback.
[Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
public readonly ref struct PixelAccessor<TPixel> where TPixel : unmanagedType parameters
TPixel- The pixel type.
Remarks
Each row is contiguous and contains exactly PixelAccessor<TPixel>.Width visible pixels; consecutive rows are not guaranteed to be adjacent in memory. The accessor is bound to the lease of the callback: once the callback returns, PixelAccessor<TPixel>.GetRowSpan throws an InvalidOperationException. A default instance has no rows.
Properties
| Name | Description |
|---|---|
| Height | Gets the number of rows. |
| Width | Gets the number of pixels per row. |
Height
PixelAccessor{TPixel}.csMethods
| Name | Description |
|---|---|
| GetRowSpan(int) | Gets a row of visible pixels. |
GetRowSpan(int)
PixelAccessor{TPixel}.csGets a row of visible pixels.
Parameters
yint- The row index, from 0 to
Height - 1.
Returns
Span<TPixel> A span of exactly PixelAccessor<TPixel>.Width pixels, valid until the callback returns.
Exceptions
ArgumentOutOfRangeExceptionyis out of range.InvalidOperationException- The callback that received the accessor has returned.