Generates Images for a TRMNL Device using SDL
Go to file
2025-12-04 18:13:23 +02:00
Widgets Added being able to set position via JSON. Text now always wraps on newlines. 2025-12-04 17:44:24 +02:00
.gitignore Updated gitignore 2025-12-04 18:13:23 +02:00
config_example.json Updated README. Added example config. Added default font for ease of use. 2025-12-04 15:32:42 +02:00
json.hpp Added initial JSON configuration support 2025-12-04 15:04:39 +02:00
main.cpp Added WidgetText. Fixed some things. Updated README 2025-12-04 17:23:53 +02:00
Makefile Added WidgetText. Fixed some things. Updated README 2025-12-04 17:23:53 +02:00
README.md Added WidgetText. Fixed some things. Updated README 2025-12-04 17:23:53 +02:00
sdl_helpers.cpp Added WidgetText. Fixed some things. Updated README 2025-12-04 17:23:53 +02:00
sdl_helpers.h Added WidgetText. Fixed some things. Updated README 2025-12-04 17:23:53 +02:00

What is this

A utility which can be used to create custom images for TRMNL devices via code

How to write new visual stuff

  1. Inherit from Widget and then do your magic inside your own class.
  2. Add your widget builder in main.cpp inside init_builders.
  3. Write your config file. Either named config.json or added as the first command line parameter.
  4. ???
  5. Profit

ImageMagick commands

Convert image without dithering

convert trmnl.png -monochrome -colors 2 -depth 1 -strip png:output.png

Convert image with dithering

convert trmnl.png -dither FloydSteinberg -remap pattern:gray50 -depth 1 -strip png:output.png

Notes

json.hpp from nlohmann/json v3.11.2