transform_sprite
Resize sprites or cels, crop or expand canvas, flip, rotate 90/180/270, or convert color mode in Aseprite.
Instructions
Transform a sprite or cel: resize, crop, expand canvas, flip, rotate (90/180/270), or convert color mode.
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": {
"file": "<file>",
"action": "<action>"
},
"name": "transform_sprite"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | For crop. | |
| y | No | For crop. | |
| top | No | For expand. | |
| file | Yes | ||
| left | No | For expand. | |
| mode | No | For set_color_mode. | |
| angle | No | For rotate (clockwise degrees). | |
| frame | No | For flip when target is layer/cel. | |
| layer | No | For flip when target is layer/cel. | |
| right | No | For expand. | |
| scale | No | For resize: scale multiplier. | |
| width | No | ||
| action | Yes | ||
| bottom | No | For expand. | |
| height | No | ||
| method | No | For resize (default nearest). | |
| target | No | For flip (default sprite). | |
| preview | No | Return an inline PNG preview in the same Aseprite call (true or options object). | |
| direction | No | For flip. | |
| dithering | No | For set_color_mode to indexed (e.g. 'none', 'ordered', 'old'). |