save_image
Save images to a specified path with customizable format and quality settings. Accepts file paths or base64-encoded image data for flexible input options.
Instructions
保存图片到指定路径
Input Schema
Name | Required | Description | Default |
---|---|---|---|
format | No | 图片格式,支持 PNG、JPEG、WEBP、BMP、TIFF 等 | PNG |
image_source | Yes | 图片源,可以是文件路径或base64编码的图片数据 | |
output_path | Yes | 输出文件路径,包含文件名和扩展名(如 'output.png') | |
quality | No | 图片质量,范围 1-100,仅对 JPEG 格式有效 |
Input Schema (JSON Schema)
{
"properties": {
"format": {
"default": "PNG",
"description": "图片格式,支持 PNG、JPEG、WEBP、BMP、TIFF 等",
"title": "Format",
"type": "string"
},
"image_source": {
"description": "图片源,可以是文件路径或base64编码的图片数据",
"title": "Image Source",
"type": "string"
},
"output_path": {
"description": "输出文件路径,包含文件名和扩展名(如 'output.png')",
"title": "Output Path",
"type": "string"
},
"quality": {
"default": 95,
"description": "图片质量,范围 1-100,仅对 JPEG 格式有效",
"maximum": 100,
"minimum": 1,
"title": "Quality",
"type": "integer"
}
},
"required": [
"image_source",
"output_path"
],
"title": "save_imageArguments",
"type": "object"
}