Animate a PNG locally (no ChatGPT)
animate_imageAnimates a local PNG with a chosen looping motion (bounce, idle, sway, nod, squash, or wiggle) and saves a new GIF beside it without altering the source file.
Instructions
Move a local PNG (e.g. a sticker saved with transparent_background=true) with code and save a new looping GIF beside it as _.gif, without overwriting files. No ChatGPT, no Chrome; takes seconds. The character stays unchanged: it only bounces, sways, squashes or breathes. For pose changes such as walking or waving, use generate_sprite. The source PNG is never changed. Returns a numbered preview of every frame.
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": {
"image_path": "<image_path>",
"motion": "<motion>"
},
"name": "animate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Output long-edge limit in pixels; enlargement uses the nearest whole multiple of the source pixel grid, so the result may be smaller. | |
| motion | Yes | bounce: jump and land; idle: gentle breathing; sway: rock side to side; nod: dip the head; squash: squash and stretch; wiggle: quick little shake. | |
| background | No | transparent | |
| image_path | Yes | Absolute path preferred (e.g. a path saved by generate_image); a relative path is resolved from the server's current folder. | |
| include_preview | No |