image_rightsize
Deterministic PNG resize in pure stdlib: exact area-average box (integer weights), centre-aligned bilinear/nearest — no float ever touches a sample, same bytes forever. fit/cover/stretch geometry via Fraction scale factors. Palette/16-bit/alpha all stay honest; Adam7 and corrupt CRC refused by name. JPEG/WebP deliberately out of contract. Free under 32 KB payload, x402 above.
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": {
"data_b64": "<data_b64>"
},
"name": "image_rightsize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| width | No | ||
| height | No | ||
| data_b64 | Yes | source PNG, base64 | |
| resample | No |