Added WidgetText. Fixed some things. Updated README

This commit is contained in:
2025-12-04 17:23:53 +02:00
parent 58abb91c64
commit 56e07e1080
8 changed files with 473 additions and 8 deletions

View File

@@ -3,17 +3,17 @@ 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.
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
`magick input.png -monochrome -colors 2 -depth 1 -strip png:output.png`
`convert trmnl.png -monochrome -colors 2 -depth 1 -strip png:output.png`
### Convert image with dithering
`magick input.png -dither FloydSteinberg -remap pattern:gray50 -depth 1 -strip png:output.png`
`convert trmnl.png -dither FloydSteinberg -remap pattern:gray50 -depth 1 -strip png:output.png`
# Notes
json.hpp from nlohmann/json v3.11.2