render_image
Render pixel-accurate layouts from text, shapes, lines, and progress elements for small displays, then return a hosted image URL with hash and change status.
Instructions
Render a custom layout from drawing elements and store it as (profile, label).
Origin (0,0) is top-left; sizes are in pixels. Colours are names (black, white, red, yellow,
gray, dark_gray, light_gray) or #rrggbb; they snap to what the profile can show. Elements:
{"type":"text","text":..,"x":..,"y":..,"size":12,"color":"black","bold":false,
"anchor":"la","max_width":px,"max_lines":1} (anchor: Pillow anchors, e.g. "la","mm","ra")
{"type":"rect","x":..,"y":..,"w":..,"h":..,"fill":colour|null,"outline":colour|null,"width":1}
{"type":"line","x1":..,"y1":..,"x2":..,"y2":..,"color":"black","width":1}
{"type":"progress","x":..,"y":..,"w":..,"h":..,"value":0.0-1.0}
Returns the image URL, sha256 and changed (see render_card).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| profile | Yes | ||
| elements | Yes | ||
| background | No | white | |
| description | No |