Fix AI PNG background
fix_ai_pngFix an AI-generated PNG for use in a game: removes a fake transparent background (the grey and white checkerboard painted into the pixels) or a flat background colour, cleans the coloured fringe around edges, deletes stray specks and trims to the content. Also cleans the edges of images that already have real transparency.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fix_ai_png"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pad | No | Transparent pixels to add around the result. | |
| name | No | Short name for the output files. | |
| force | No | Remove the border colour even when no background was detected. | |
| frame | No | trim to the content, keep the original size, or trim and pad to a square. | trim |
| image_url | No | Public http(s) URL of a PNG image, up to about 128×128 pixels. | |
| tolerance | No | How far a colour can be from the background and still be removed. Default 34 for a checkerboard, 40 for a solid colour. | |
| image_base64 | No | The PNG file as base64 (a data: URL also works). Use instead of image_url. |