PixelBytesAccessor Struct
- Obsolete: Types with embedded references are not supported in this version of your compiler.
Scoped access to the raw bytes of the rows of a frame, valid only during a ImageFrame.ProcessPixelBytes callback.
[Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
public readonly ref struct PixelBytesAccessorRemarks
Each row is contiguous and contains exactly PixelBytesAccessor.RowLength bytes of visible pixels; 16-bit components are in native endianness. The accessor is bound to the lease of the callback: once the callback returns, PixelBytesAccessor.GetRowSpan throws an InvalidOperationException. A default instance has no rows.
Properties
| Name | Description |
|---|---|
| Height | Gets the number of rows. |
| PixelFormat | Gets the pixel format describing the byte layout. |
| RowLength | Gets the number of visible bytes per row (Width * bytesPerPixel). |
| Width | Gets the number of pixels per row. |
Height
PixelBytesAccessor.csPixelFormat
PixelBytesAccessor.csGets the pixel format describing the byte layout.
public PixelFormat PixelFormat { get; }Property value
RowLength
PixelBytesAccessor.csMethods
| Name | Description |
|---|---|
| GetRowSpan(int) | Gets the bytes of a row of visible pixels. |
GetRowSpan(int)
PixelBytesAccessor.csGets the bytes of a row of visible pixels.
Parameters
yint- The row index, from 0 to
Height - 1.
Returns
Span<byte> A span of exactly PixelBytesAccessor.RowLength bytes, valid until the callback returns.
Exceptions
ArgumentOutOfRangeExceptionyis out of range.InvalidOperationException- The callback that received the accessor has returned.