Class BitmapImage
Represents bitmap image
public abstract class BitmapImage
- Inheritance
-
BitmapImage
Constructors
BitmapImage(byte[], int, int, int)
Initializes a BitmapImage instance with the specified data, width, height and stride.
protected BitmapImage(byte[] data, int width, int height, int stride)
Parameters
databyte[]Data representing the image (derived class defines a specific format)
widthintWidth of the image
heightintHeight of the image
strideintNumber of bytes per row
Properties
Data
Data related to the image (derived class defines a specific format)
public SpanByte Data { get; }
Property Value
Height
Height of the image
public int Height { get; }
Property Value
Stride
Number of bytes per row
public int Stride { get; }
Property Value
Width
Width of the image
public int Width { get; }
Property Value
Methods
Clear(Color)
Clears the image to specific color
public virtual void Clear(Color color = default)
Parameters
colorColorColor to clear the image. Defaults to black.
SetPixel(int, int, Color)
Sets pixel at specific position
public abstract void SetPixel(int x, int y, Color color)