Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

ImageMagick Guide

Create TRMNL-friendly images.

TRMNL supports BMP3 and PNG images natively, starting with FW v1.5.2. Below are some tips to generate TRMNL compatible images for DIY devices or Alias/Redirect plugin applications. These mirror the ImageMagick commands our own render pipeline runs.

Match your image to the device. Every model's width, height, bit depth + palette is listed at trmnl.com/api/models (palette colors at trmnl.com/api/palettes). Keep PNGs under the model's image_size_limit -- 90,000 bytes for ESP32 boards without PSRAM like TRMNL OG, 750,000 bytes for TRMNL X. Our firmware won't draw anything larger.

Generating a BMP3 image

Convert command

magick input.png -monochrome -colors 2 -depth 1 -strip bmp3:output.bmp

Identify command

% magick identify output.bmp 
output.bmp BMP3 800x480 800x480+0+0 1-bit sRGB 2c 48062B 0.020u 0:00.001

Please note that the output of above needs to match exactly with your file.

Generating a PNG image - 1 bit

Converting an image

magick input.png -monochrome -colors 2 -depth 1 -strip png:output.png    

Dithering an image

magick input.png -dither FloydSteinberg -remap pattern:gray50 -depth 1 -strip png:output.png

Identify command

% magick identify output.png 
output.png PNG 800x480 800x480+0+0 8-bit Grayscale Gray 2c 1607B 0.000u 0:00.000

Generating a PNG image - 2 bit

Use this for 4-gray devices, like the TRMNL OG (2-bit) model on FW 1.6.0+ with grayscale + fast refresh support. After creating an image, upload it to a public or private/local network and point to it with an Alias plugin instance.

Dithering an image

Generating a PNG image - 4 bit

Use this for 16-gray devices, like TRMNL X.

Dithering an image

Generating a PNG image - color

For color panels (B/W/R, B/W/R/Y, 6- + 7-color), map every pixel to the panel's palette. This example uses the 6-color palette (color-6a); swap in the hex values for your panel from trmnl.com/api/palettes.

Dithering an image

Last updated