match_screenshot
Compare a UI render to a baseline PNG pixel by pixel. Accepts per-channel tolerance, differing-pixel budget, and mask rectangles to ignore volatile regions. Returns diff stats and a diff-image preview on mismatch.
Instructions
Compare a UI's render against a baseline PNG (path on disk), pixel by pixel, with an optional per-channel tolerance, differing-pixel budget, and mask rectangles to ignore (volatile regions). Returns the diff stats and a diff-image preview on mismatch — a normal result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| masks | No | Rectangles to ignore when comparing (volatile regions), logical px. | |
| theme | No | ||
| budget | No | Allowed differing-pixel fraction. | |
| tolerance | No | Per-channel tolerance (0 = exact). | |
| description | Yes | The UI description: a `fenestra/1` JSON object. | |
| baseline_path | Yes | Path to the baseline PNG on disk. |