pixoo_push_image
pixoo_push_imageLoad, resize, and optionally push an image or animated GIF/WebP onto a Pixoo LED grid, returning a preview of the finished frames.
Instructions
Load an image (absolute local path or https URL), resize it to fit the LED grid, and optionally push it to the display. An animated GIF or WebP pushes as an animation of up to maxFrames frames (default 40), sampled evenly from a longer source and played at the speed that keeps its loop length; past 40 frames it plays as one GIF the device downloads from this host. Returns the downsampled result as an image content block so you see exactly what the display received — for an animation, a grid of its frames, evenly sampled once they outnumber what fits the sheet. Nearest-neighbor kernel preserves pixel art; use lanczos3 or mitchell for photos. finish reduces the result to a small or fixed palette, optionally dithered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | Resize fit mode: contain (letterbox), cover (crop to fill), fill (stretch). | contain |
| push | No | Push the resized image to the device (default: true). | |
| speed | No | Milliseconds per frame for an animated source (10–2000). Default: the source's total duration over the pushed frame count, or 150 when it records no delays. A still ignores it. | |
| finish | No | Reduce the image to a palette before it reaches the panel: exactly one of colors (2–256, built from the image) or palette (1–256 hex or named colors), plus dither. Transparent pixels stay unlit and are not counted. The preview shows the finished frame. | |
| kernel | No | Resize kernel: nearest for pixel art, lanczos3 for photos, mitchell for a balance. | nearest |
| source | Yes | Absolute local file path or https (not http) URL of the image to display; a relative path is rejected. An animated GIF or WebP, whatever its file name, pushes as an animation. | |
| maxFrames | No | Most frames an animated source pushes (1–800, default 40); a longer source is sampled evenly down to it. Up to 40 push frame by frame; more play as one GIF the device downloads from this host, so the device must reach it (behind NAT or a firewall, set PIXOO_SERVE_HOST and PIXOO_SERVE_PORT), and speed rounds to the nearest 10 ms. A still ignores it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| speed | No | Milliseconds per frame the animation plays at. Absent for a still. | |
| frames | No | Frames rendered and pushed: 1 for a still, 2 to maxFrames for an animation. | |
| notice | No | Warning or informational message. | |
| pushed | No | True when the device acknowledged the push; past 40 frames, once it accepted the GIF play, requested the file, and the whole file was handed to the OS to send (the device does not confirm receipt). | |
| deviceState | No | Device state after the push. Absent when push: false. | |
| outputFiles | No | Absolute paths to saved preview files: a PNG for a still, an 8× GIF at the pushed speed for an animation, or past 40 frames the panel-size GIF the device downloads. Present only when PIXOO_OUTPUT_DIR is configured. | |
| sourceFrames | No | Frames in the source before sampling down to maxFrames: 1 for a still. |