compare_frames
Count differing RGBA pixels between two sprite frames and return the bounding box around changes, optionally restricting comparison to a specific layer or canvas region.
Instructions
Count the pixels that differ between two frames and box them in.
A pixel differs when its RGBA differs; two fully transparent pixels are equal. bounds is the canvas box around the differences, null when the frames are identical. Without layer the visible composites are compared.
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>",
"frame_a": "<frame_a>",
"frame_b": "<frame_b>"
},
"name": "compare_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| layer | No | Layer name or 'group/child' path for that layer's own pixels; omit for the visible layers composited | |
| region | No | Only compare this canvas rectangle; default all | |
| frame_a | Yes | 1-based frame number | |
| frame_b | Yes | 1-based frame number |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||