compare_frames
Compare two frames of an Aseprite sprite to measure pixel differences, including changed pixel count, percentage changed, and bounding box of changes. Use to verify frame changes during animation.
Instructions
Compare two frames and report how much they differ.
Flattens the sprite (non-destructively) and diffs the two frames 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
Returns: JSON with changed pixel count, total pixels, percent changed, and the bounding box of the changed region.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| frame_a | Yes | ||
| frame_b | Yes |