Scripting API

Scripting API

ImagePixels

Record in Abyss.Core, from Abyss.Core.

An image's pixels: its first level, four bytes a texel, row by row from the top left.

public record ImagePixels

Constructors

ImagePixels

public ImagePixels(int Width, int Height, byte[] Rgba)

An image's pixels: its first level, four bytes a texel, row by row from the top left.

Parameters

  • Width: Texels across.
  • Height: Texels down.
  • Rgba: Red, green, blue and alpha of each, Width × Height × 4 bytes.

Properties

Width

public int Width { get; init; }

Texels across.

Height

public int Height { get; init; }

Texels down.

Rgba

public byte[] Rgba { get; init; }

Red, green, blue and alpha of each, Width × Height × 4 bytes.

Methods

At

public ReadOnlySpan<byte> At(int x, int y)

The four bytes of the texel x across and y down.

Parameters

  • x
  • y