Show / Hide Table of Contents

Interface IRawImage

Represents a raw in-memory image with direct pixel data access. Contrast with encoded images (PNG, JPEG) — this is the decoded pixel buffer with known dimensions, stride, and format.

Inherited Members
IDisposable.Dispose()
Namespace: Zaya.Primitives
Assembly: Zaya.Primitives.dll
Syntax
public interface IRawImage : IDisposable

Properties

| Edit this page View Source

Format

Gets the pixel format of the image.

Declaration
PixelFormat Format { get; }
Property Value
Type Description
PixelFormat
| Edit this page View Source

Height

Gets the height of the image in pixels.

Declaration
int Height { get; }
Property Value
Type Description
int
| Edit this page View Source

Stride

Gets the number of bytes per row (stride). May be larger than Width * BytesPerPixel due to memory alignment.

Declaration
int Stride { get; }
Property Value
Type Description
int
| Edit this page View Source

Width

Gets the width of the image in pixels.

Declaration
int Width { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

GetPixelData()

Gets the raw pixel data as a read-only span. Direct access to the underlying buffer without additional allocations.

Declaration
ReadOnlySpan<byte> GetPixelData()
Returns
Type Description
ReadOnlySpan<byte>
| Edit this page View Source

ToByteArray()

Creates a copy of the pixel data as a byte array. Useful when the data needs to outlive the frame instance.

Declaration
byte[] ToByteArray()
Returns
Type Description
byte[]

A new byte array containing a copy of the pixel data.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX