remove_stray_pixels
Clean noise from Aseprite layers and frames by recoloring stray pixels to their most common neighboring color or erasing lone pixels, while protecting deliberate single-pixel details.
Instructions
Clean noise: pixels whose colour none of their 8 neighbours share.
Each stray pixel takes the most common colour around it; a lone pixel
floating in empty space is erased (remove_lone=False keeps those, e.g.
stars or sparkles). List deliberate single pixels - eye glints, a
sword's shine - in protect.
Args: filename: Aseprite file layer_name: Image layer ("" = topmost, "*" = all image layers) frames: "" or "all" = every frame, or "3", "1-4", "1,3,6-8" protect: Pixels to keep, "x,y;x,y" remove_lone: Also erase single pixels with nothing around them dry_run: Report only
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>"
},
"name": "remove_stray_pixels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frames | No | ||
| dry_run | No | ||
| protect | No | ||
| filename | Yes | ||
| layer_name | No | ||
| remove_lone | No |