Images Node
图像处理节点。
功能
- 图片接收
- 图片发送
- 图像识别
- 图像处理
配置
json
{
"images": {
"maxSize": 10485760,
"formats": ["jpg", "png", "gif", "webp"],
"compression": {
"enabled": true,
"quality": 85
}
}
}使用示例
typescript
// 发送图片
await images.send({
channel: 'telegram',
to: '@user',
image: '/path/to/image.jpg',
caption: '图片描述'
})
// 接收图片
openclaw.on('image', async (ctx) => {
const image = ctx.message.image
// 处理图片
})
// OCR 识别
const text = await images.ocr('/path/to/image.jpg')支持的平台
| 平台 | 最大尺寸 | 支持格式 |
|---|---|---|
| Telegram | 10MB | JPG, PNG, GIF, WebP |
| 16MB | JPG, PNG, GIF | |
| Discord | 8MB | JPG, PNG, GIF, WebP |