Inkplate 6COLOR – MicroSD Display Image
To display images from SD card use the drawImage() function, specifying the image location on SD card.
ℹ️
Supported image formats: JPG, BMP, and PNG.
from inkplate6COLOR import Inkplate
from os import listdir
# Create Inkplate object
inkplate = Inkplate()
# Initialize the display, needs to be called only once
inkplate.begin()
# Initialize SD card
inkplate.initSDCard(fastBoot=True)
# This prints all the files on SD card
print(listdir("/sd"))
# Draw image found on SD card
inkplate.drawImage("sd/coastal.jpg", 0, 0, invert=False, dither=True, kernel_type=Inkplate.KERNEL_FLOYD_STEINBERG)
# Show the image from the buffer
inkplate.display()
inkplate.SDCardSleep()
# To turn it back on, use:
# inkplate.SDCardWake()

Example image from sd card
inkplate.drawImage()
This function draws an image from the specified char path (either web URL or local file path)
Returns value: None
Function parameters:
| Type | Name | Description |
|---|---|---|
string | path | Path and filename of the image. Can be a URL (for web images) or a file path (on the microSD card). |
int | x0 | X-coordinate of the image's upper-left corner in the framebuffer. |
int | y0 | Y-coordinate of the image's upper-left corner in the framebuffer. |
bool | invert | If true, inverts colors. |
bool | dither | Dithering mode: 0 (disabled), 1 (enabled). |
int | kernel_type | Specifies dithering algorithm to use. |
ℹ️
Available options for dithering algorithm:
| Algorithm | Value |
|---|---|
Inkplate.KERNEL_FLOYD_STEINBERG | 0 |
Inkplate.KERNEL_JJN | 1 |
Inkplate.KERNEL_STUCKI | 2 |
Inkplate.KERNEL_BURKES | 3 |
Performance Notes
- JPG: ~3 seconds (or ~14s with dithering)
- PNG: ~9 seconds (or ~19s with dithering)
- BMP: ~20 seconds (or ~40s with dithering)
- Maximum image file size: ~800kB