Class BitmapImage
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
intWidth of the image.
height
intHeight of the image.
stride
intNumber 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
Stride
Gets number of bytes per row.
public int Stride { get; }
Property Value
Width
Gets width of the image.
public int Width { get; }
Property Value
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
ColorColor to clear the image. Defaults to black.
Clear(int, int)
Clears selected pixel.
public abstract void Clear(int x, int y)
Parameters
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
intX coordinate of the pixel.
y
intY coordinate of the pixel.
r
byteRed color.
g
byteGreen color.
b
byteBlue color.
SetPixel(int, int, Color)
Sets pixel at specific position.
public abstract void SetPixel(int x, int y, Color color)