brief Bitmap that can be drawn using brain.Screen.drawBitmap
More...
|
def | __init__ (self, width, height, pixel_data=None) |
| brief Create a bitmap from a raw pixel data param pixel_data pixels: list or tuple of color values, or a string of raw bytes returns a new Bitmap object More...
|
|
brief Bitmap that can be drawn using brain.Screen.drawBitmap
◆ __init__()
def vex.Bitmap.__init__ |
( |
|
self, |
|
|
|
width, |
|
|
|
height, |
|
|
|
pixel_data = None |
|
) |
| |
brief Create a bitmap from a raw pixel data param pixel_data pixels: list or tuple of color values, or a string of raw bytes returns a new Bitmap object
◆ from_png()
def vex.Bitmap.from_png |
( |
|
png_data | ) |
|
|
static |
Create a bitmap from PNG format data.
- Parameters
-
png_data | bytes of the PNG image: bytearray, list, tuple or string of raw bytes |
- Returns
- a new Bitmap object
◆ from_png_file()
def vex.Bitmap.from_png_file |
( |
|
filename | ) |
|
|
static |
Create a bitmap from PNG file.
- Parameters
-
filename | string name of file on SD card, e.g. "MyImage.png" |
- Returns
- a new Bitmap object