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.
Generating a BMP3 image
Convert command
magick input.png -monochrome -colors 2 -depth 1 -strip bmp3:output.bmpIdentify command
% magick identify output.bmp
output.bmp BMP3 800x480 800x480+0+0 1-bit sRGB 2c 48062B 0.020u 0:00.001Please 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.pngIdentify command
% magick identify output.png
output.png PNG 800x480 800x480+0+0 8-bit Grayscale Gray 2c 1607B 0.000u 0:00.000Generating 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