compare_frames
Compare two animation frames pixel by pixel to measure changed pixel count, percent changed, and the bounding box of differences. Verify a frame actually changed or stayed within limits while animating.
Instructions
Compare two frames and report how much they differ.
Renders both frames as you see them (visible layers only) and diffs them pixel by pixel. Use while animating to confirm a frame actually changed, or that it did not change too much.
Args: filename: Aseprite file to read frame_a: First frame index, starting at 1 frame_b: Second frame index, starting at 1 layer_name: Compare only this layer (or group), e.g. the character without the effects around it; "" compares all visible layers region: Compare only "x,y,w,h" (sprite pixels), e.g. the legs, to prove that part did or did not move; "" compares the whole frame
Returns: JSON with changed pixel count, total pixels, percent changed, and the bounding box of the changed region.
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": {
"filename": "<filename>",
"frame_a": "<frame_a>",
"frame_b": "<frame_b>"
},
"name": "compare_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | ||
| frame_a | Yes | ||
| frame_b | Yes | ||
| filename | Yes | ||
| layer_name | No |