adafruit_bitmapsaver
¶
Save a displayio.Bitmap (and associated displayio.Palette) in a BMP file. Make a screenshot (the contents of a displayio.Display) and save in a BMP file.
- Author(s): Dave Astels
Implementation Notes¶
Hardware:
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
-
adafruit_bitmapsaver.
save_pixels
(file_or_filename, pixel_source=None, palette=None)¶ Save pixels to a 24 bit per pixel BMP file. If pixel_source if a displayio.Bitmap, save it’s pixels through palette. If it’s a displayio.Display, a palette isn’t required.
Parameters: - file_or_filename – either the file to save to, or it’s absolute name
- pixel_source – the Bitmap or Display to save
- palette – the Palette to use for looking up colors in the bitmap