Image
生成和处理图像内容的基础功能模块
Core functionality module for generating and processing image content
clawhub install image将 SVG 矢量图转换为标准的图片格式
Convert SVG vector graphics into standard image formats
# 安装 Skill(会下载 SKILL.md 到 .claude/skills/) clawhub install svg-to-image # 之后直接对 Claude 说"用 SVG to Image 帮我…"即可
# 同样的安装命令,兼容所有支持 SKILL.md 的 AI 编程工具 clawhub install svg-to-image
此 Skill 兼容 OpenClaw 标准。 安装后自动生成 SKILL.md 文件,任何支持 OpenClaw 协议的 AI Agent(Claude Code、Cursor、Windsurf 等)均可直接调用。
完全本地处理,仅需clawhub账号
cairosvg (SVG rendering)Pillow (only for JPG output)pip install -r requirements.txt (from the skill folder). On Linux (e.g. Ubuntu/Debian), install the Cairo library first: sudo apt install libcairo2. If a script fails with ModuleNotFoundError or a cairo library error, install the missing package or system library.input: Path to the SVG file.-o, --output: Output file path (default: same name as input with .png or .jpg).-f, --format: png (default) or jpg.--width, --height: Optional output size in pixels (keeps aspect ratio if only one is set).--dpi: Scale for rasterization (default 96).# SVG to PNG (default)
python3 scripts/convert_svg.py drawing.svg -o drawing.png
# SVG to JPG
python3 scripts/convert_svg.py drawing.svg -f jpg -o drawing.jpg
# Fixed width 800px (height auto)
python3 scripts/convert_svg.py map.svg -o map.png --width 800
-o <path>.png or -o <path>.jpg, then send that file to the user via the OpenClaw message/media tool.~/.openclaw/media/, ~/.openclaw/agents/, or /tmp). Use e.g. -o ~/.openclaw/media/out.png or -o /tmp/out.png; do not use the skill install directory or sending will fail.exec: use convert_svg.py <svg_path> -o <output>.png (or -f jpg) with output path under an allowed dir, then send the generated image. Do not ask for confirmation; execute and return the image.convert_svg.py <path> -o /tmp/out.png, then send the PNG to the user.-f jpg -o /tmp/map.jpg --width 1200, then send the JPG.clawhub svg-to-image --input icon.svg --output icon_96x96.png --width 96 --height 96 && clawhub svg-to-image --input icon.svg --output icon_256x256.png --width 256 --height 256图像托管:将图像上传到 img402.dev 获取公开链接,用于消息分享、文档嵌入或社交媒体发布。
Upload images to img402.dev and get a public URL. Free tier: 1MB max, 7-day retention, no auth. Use when the agent needs a hosted image URL — for sharing in messages, embedding in documents, posting to social platforms, or any context that requires a public link to an image file.
clawhub install image-hosting