Skip to main content

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()
Expected output on Inkplate display
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:

TypeNameDescription
stringpathPath and filename of the image. Can be a URL (for web images) or a file path (on the microSD card).
intx0X-coordinate of the image's upper-left corner in the framebuffer.
inty0Y-coordinate of the image's upper-left corner in the framebuffer.
boolinvertIf true, inverts colors.
boolditherDithering mode: 0 (disabled), 1 (enabled).
intkernel_typeSpecifies dithering algorithm to use.
ℹ️

Available options for dithering algorithm:

AlgorithmValue
Inkplate.KERNEL_FLOYD_STEINBERG0
Inkplate.KERNEL_JJN1
Inkplate.KERNEL_STUCKI2
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