Rd Quantize
rd_quantizeReduce PNG colors to an indexed GBA-friendly palette. Returns the hex palette and saves a quantized PNG with chosen color count via median-cut quantization.
Instructions
Reduce a PNG to an indexed palette (GBA-friendly) and return the hex palette.
Pillow median-cut quantization; output is a P-mode PNG. Default out_path sits next to the input with a _q{colors} suffix.
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": {
"image_path": "<image_path>"
},
"name": "rd_quantize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| colors | No | ||
| out_path | No | ||
| image_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||