添加文字标记
image_draw_textDraw text on images to add annotations, labels, or Chinese captions. Specify text content, position, font size, colors, and get an annotated image as base64.
Instructions
在图片上绘制文字,支持中文。
适用于在图片上添加注释、说明文字等。 中文字体支持:优先使用VISION_MCP_FONT_PATH指定的字体文件,其次尝试系统CJK字体。
参数:
image: 图片路径或URL
texts: 文字列表,每个包含x/y(位置)、text(内容)、font_size(字号)、color(颜色)、background_color(背景色)
normalized: 坐标是否为0-1归一化值(默认false,像素坐标)
output_path: 可选,保存到文件路径
返回:标注后的图片(base64 PNG)和元信息
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | 图片路径或URL(http/https开头为URL,否则为本地路径) | |
| texts | Yes | 文字列表 | |
| normalized | No | 坐标是否为0-1归一化值。false表示像素坐标,true表示归一化坐标。 | |
| output_path | No | 可选:输出图片保存的文件路径。无论是否设置,图片都会以base64返回。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| format | Yes | ||
| height | Yes | ||
| size_bytes | Yes |