export
Render sprites to PNG, GIF, WebP, BMP, TGA or QOI with optional frames, tags, layers, scaling and background. Writes each frame to its own file and reports the files, size and bytes written.
Instructions
Render the sprite to .png, .gif, .webp, .bmp, .tga or .qoi; the sprite is not changed.
.gif and .webp hold an animation: by default every frame, with the frame durations (gif loops forever, alpha is 1-bit). The other formats hold one image: by default frame 1; when several frames are exported each goes to its own file named after the frame number, e.g. walk.png with frames "1-3" writes walk_1.png, walk_2.png and walk_3.png (no walk.png). Pass frames or tag, not both; a tag's frames are exported in order whatever its direction. Hidden layers are left out; with layer, only that layer (or group) is shown, even when it is hidden, with its opacity and blend mode. The output folder must exist; existing files are refused unless overwrite is true. Files are written completely or not at all. One call writes at most 67108864 pixels, all frames and the scale counted. Not available in batch. Returns the files written, the frames, the image size and total bytes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"output": "<output>"
},
"name": "export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Export this tag's frames | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| layer | No | Export only this layer or group, shown alone | |
| scale | No | Output pixels per sprite pixel (nearest) | |
| frames | No | Frames: a number, "1-4", "1-4,7" or "all"; default see below | |
| output | Yes | Image file to write; the extension picks the format | |
| overwrite | No | Replace files that already exist | |
| background | No | Colour behind transparent pixels; default none |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||