export_image
Exports the current GIMP image to a raster file (PNG, JPEG, WEBP, or TIFF) at a specified path, with optional quality and flattening controls.
Instructions
Export the current image to a raster file (PNG, JPEG, WEBP, TIFF).
Parameters:
file_path: Absolute path for the output file
format: Output format — "png" (default), "jpeg", "webp", "tiff"
quality: JPEG/WEBP quality 1-100 (default 90; ignored for PNG/TIFF)
flatten: Flatten all layers before export (default True)
image_index: Index of the image to export (default 0)
Returns:
status, file_path, format, file_size_bytes
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": {
"file_path": "<file_path>"
},
"name": "export_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | png | |
| flatten | No | ||
| quality | No | ||
| file_path | Yes | ||
| image_index | No |