export_web_optimized
Export an image as both JPEG and PNG, compare file sizes, and recommend the smaller format for web use. Optionally scale dimensions and set quality or compression before export.
Instructions
Export an image as both JPEG and PNG, choosing the smaller format.
Parameters:
output_dir: Directory to write output files
jpeg_quality: JPEG quality 1-100 (default 85)
png_compression: PNG compression level 0-9 (default 9)
max_width / max_height: Optional scaling before export
image_index: Source image index (default 0)
Returns: {jpeg_path, jpeg_size, png_path, png_size, recommendation}
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": {
"output_dir": "<output_dir>"
},
"name": "export_web_optimized"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_width | No | ||
| max_height | No | ||
| output_dir | Yes | ||
| image_index | No | ||
| jpeg_quality | No | ||
| png_compression | No |