adafruit_imageload
¶
Load pixel values (indices or colors) into a bitmap and colors into a palette.
- Author(s): Scott Shawcroft
-
adafruit_imageload.
load
(filename, *, bitmap=None, palette=None)¶ Load pixel values (indices or colors) into a bitmap and colors into a palette.
bitmap is the desired type. It must take width, height and color_depth in the constructor. It must also have a _load_row method to load a row’s worth of pixel data.
palette is the desired pallete type. The constructor should take the number of colors and support assignment to indices via [].
adafruit_imageload.bmp
¶
Load pixel values (indices or colors) into a bitmap and colors into a palette from a BMP file.
- Author(s): Scott Shawcroft
-
adafruit_imageload.bmp.
load
(file, *, bitmap=None, palette=None)¶ Loads a bmp image from the open
file
.Returns tuple of bitmap object and palette object.
Parameters: - bitmap (object) – Type to store bitmap data. Must have API similar to
displayio.Bitmap
. Will be skipped if None - palette (object) – Type to store the palette. Must have API similar to
displayio.Palette
. Will be skipped if None
- bitmap (object) – Type to store bitmap data. Must have API similar to
adafruit_imageload.bmp.indexed
¶
Load pixel values (indices or colors) into a bitmap and colors into a palette from an indexed BMP.
- Author(s): Scott Shawcroft
-
adafruit_imageload.bmp.indexed.
load
(file, width, height, data_start, colors, color_depth, *, bitmap=None, palette=None)¶ Loads indexed bitmap data into bitmap and palette objects.
Parameters: