跳到正文
TakoAPI
返回技能列表

svg-to-image

由 qrost 提供

Image & Video Generation
392下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Convert SVG to PNG or JPG for quick sharing (e.g.

描述

该技能的功能

Converts SVG files to PNG or JPG using cairosvg and Pillow. Supports custom output dimensions and DPI. Works with OpenClaw's media delivery pipeline to send generated images directly in conversation.

Handles conversion and in-chat delivery in one step without opening a graphics editor or manually uploading the file.

何时使用

  • Sending a vector diagram as a PNG in Telegram
  • Exporting a map SVG at a fixed pixel width for a report
  • Converting design tool output to JPG for document embedding
  • Rasterizing diagramming workflow output for quick sharing
  • Preparing print-ready raster images from SVG source files

示例工作流

输入

User asks: Convert map.svg to a 1200px wide JPG and send it

智能体
  1. 1

    Run convert_svg.py with map.svg, -f jpg, --width 1200, output to /tmp/map.jpg

  2. 2

    Script rasterizes the SVG using cairosvg at the specified width

  3. 3

    Send the generated JPG to the user via the OpenClaw media tool

输出

JPG image delivered to the user in the conversation

前置要求

  • cairosvg Python package (run pip install -r requirements.txt from the skill folder)
  • Pillow Python package (required for JPG output, included in requirements.txt)
  • libcairo2 system library on Linux/Debian/Ubuntu (sudo apt install libcairo2)

安装

clawhub install qrost/svg-to-image

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接