media_frames_to_gif
Compile PNG/JPG image frames into an animated GIF with adjustable frame rate, looping, title overlay, resizing, and palette optimization.
Instructions
Compose PNG/JPG image frames into an animated GIF (Pillow; no COMSOL needed).
Args: frames: list of image paths, or a one-element list containing a frames directory, e.g. ["C:/out/frames"] (files are sorted naturally). output: output .gif path (auto-generated when omitted). fps: frames per second (default 10; converted to GIF frame duration). loop: 0 = loop forever (default), n = repeat n times. optimize: optimise the GIF palette/file size. title: optional title text drawn on every frame. title_position: "top" (default) | "bottom" | "overlay-top" | "overlay-bottom". title_font_size: title font size px (default 18). max_width: downscale frames wider than this. max_frames: keep at most this many frames (evenly spaced). hold_last_s: extra seconds to show the last 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": {
"frames": "<frames>"
},
"name": "media_frames_to_gif"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | ||
| loop | No | ||
| title | No | ||
| frames | Yes | ||
| output | No | ||
| optimize | No | ||
| max_width | No | ||
| max_frames | No | ||
| hold_last_s | No | ||
| title_position | No | top | |
| title_font_size | No |