CodeGlyphX logo
CodeGlyphX

API Reference

Class

ImageFrame

Namespace CodeGlyphX
Assembly CodeGlyphX
Modifiers sealed

Describes a non-owning raw image buffer supplied to the symbol scanner.

Inheritance

  • Object
  • ImageFrame

Remarks

The caller remains responsible for the lifetime and mutation of the underlying memory for the duration of a scan.

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by

Accepted by parameters

Constructors

public ImageFrame(ReadOnlyMemory<Byte> pixels, Int32 width, Int32 height, Int32 stride, PixelFormat pixelFormat, ImageRowOrder rowOrder = TopDown) #

Creates a raw image frame.

Parameters

pixels System.ReadOnlyMemory{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
pixelFormat CodeGlyphX.PixelFormat requiredposition: 4
rowOrder CodeGlyphX.ImageRowOrder = TopDown optionalposition: 5

Methods

public static Int32 GetBytesPerPixel(PixelFormat pixelFormat) #
Returns: Int32

Gets the byte width of one pixel for a supported packed format.

Parameters

pixelFormat CodeGlyphX.PixelFormat requiredposition: 0
public static Int32 GetMinimumRowBytes(Int32 width, PixelFormat pixelFormat) #
Returns: Int32

Gets the minimum valid row length for a packed pixel format.

Parameters

width System.Int32 requiredposition: 0
pixelFormat CodeGlyphX.PixelFormat requiredposition: 1
public static ImageFrame Packed(ReadOnlyMemory<Byte> pixels, Int32 width, Int32 height, PixelFormat pixelFormat, ImageRowOrder rowOrder = TopDown) #
Returns: ImageFrame

Creates a raw image frame whose stride is the tightly packed row length for the selected format.

Parameters

pixels System.ReadOnlyMemory{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
pixelFormat CodeGlyphX.PixelFormat requiredposition: 3
rowOrder CodeGlyphX.ImageRowOrder = TopDown optionalposition: 4

Properties

public ReadOnlyMemory<Byte> Pixels { get; } #

Gets the raw pixel memory.

public Int32 Width { get; } #

Gets the image width in pixels.

public Int32 Height { get; } #

Gets the image height in pixels.

public Int32 Stride { get; } #

Gets the number of bytes between adjacent rows.

public PixelFormat PixelFormat { get; } #

Gets the raw pixel format.

public ImageRowOrder RowOrder { get; } #

Gets the row order in the source buffer.