Design
为图片添加晕影效果,支持自定义风格、强度和颜色
用三种语言从你的代码中调用此工具。
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-add-vignette' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/zh/api/tools/image-add-vignette' \
-F 'imageFile=/path/to/file.ext' \
-F 'style=classic' \
-F 'size=0.8' \
-F 'intensity=0.7' \
-F 'feather=0.5' \
-F 'color=#000000' \
-F 'opacity=1' \
-F 'outputFormat=png' \
-F 'quality=90'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/image-add-vignette| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| imageFile | file需先上传 | 是 | 上传要添加晕影效果的图片文件 |
| style | select | 否 | 选择晕影风格 |
| size | number | 否 | 晕影效果的大小 (0.1-1.5) |
| intensity | number | 否 | 变暗效果的强度 (0.0到1.0) |
| feather | number | 否 | 晕影边缘的柔和度 (0.0到1.0) |
| color |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-image-add-vignette": {
"name": "image-add-vignette",
"description": "为图片添加晕影效果,支持自定义风格、强度和颜色",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-add-vignette",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-add-vignette",
"arguments": {
"imageFile": "https://example.com/file.ext",
"style": "classic",
"size": 0.8,
"intensity": 0.7,
"feather": 0.5,
"color": "#000000",
"opacity": 1,
"outputFormat": "png",
"quality": 90
}
}
}| color |
| 否 |
| 晕影效果的颜色 |
| opacity | number | 否 | 晕影效果的透明度 (0.0到1.0) |
| outputFormat | select | 否 | 选择输出格式或保持原格式 |
| quality | number | 否 | 有损格式的输出质量(WebP、JPEG) |
文件结果
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}有问题或反馈?请联系 [email protected]