Table of Contents

Class BitmapImage

Namespace
Iot.Device.Ws28xx.Esp32
Assembly
Iot.Device.Ws28xx.Esp32.dll

Represents bitmap image.

public abstract class BitmapImage
Inheritance
BitmapImage
Derived

Constructors

BitmapImage(byte[], int, int, int)

Initializes a new instance of theBitmapImage class.

protected BitmapImage(byte[] data, int width, int height, int stride)

Parameters

data byte[]

Data representing the image (derived class defines a specific format).

width int

Width of the image.

height int

Height of the image.

stride int

Number of bytes per row.

Properties

Data

Data related to the image (derived class defines a specific format).

public byte[] Data { get; }

Property Value

byte[]

Height

Getsd height of the image.

public int Height { get; }

Property Value

int

Stride

Gets number of bytes per row.

public int Stride { get; }

Property Value

int

Width

Gets width of the image.

public int Width { get; }

Property Value

int

Methods

Clear()

Clears whole image.

public abstract void Clear()

Clear(Color)

Clears the image to specific color.

public virtual void Clear(Color color)

Parameters

color Color

Color to clear the image. Defaults to black.

Clear(int, int)

Clears selected pixel.

public abstract void Clear(int x, int y)

Parameters

x int

X pixel.

y int

Y pixel.

SetPixel(int, int, byte, byte, byte)

Sets pixel at specific position.

public abstract void SetPixel(int x, int y, byte r, byte g, byte b)

Parameters

x int

X coordinate of the pixel.

y int

Y coordinate of the pixel.

r byte

Red color.

g byte

Green color.

b byte

Blue color.

SetPixel(int, int, Color)

Sets pixel at specific position.

public abstract void SetPixel(int x, int y, Color color)

Parameters

x int

X coordinate of the pixel.

y int

Y coordinate of the pixel.

color Color

Color to set the pixel to.