← 返回 Skills 市场
image-convert
作者
Shuguang Tang
· GitHub ↗
· v1.0.0
· MIT-0
34
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install image-convert
功能描述
Convert and compress images or videos between formats including PNG, JPG, WebP, GIF, BMP, TIFF, HEIC, AVIF, and create GIFs from videos with adjustable quali...
使用说明 (SKILL.md)
Image Convert & Compress
Quick Commands
Format Conversion (ffmpeg)
ffmpeg -i input.png output.jpg # PNG → JPG
ffmpeg -i input.jpg output.png # JPG → PNG
ffmpeg -i input.png output.webp # PNG → WebP
ffmpeg -i input.jpg output.webp # JPG → WebP (lossy)
ffmpeg -i input.jpg output.webp -quality 90 # JPG → WebP 高质量
macOS Built-in (sips)
sips -s format jpeg input.png --out output.jpg # PNG → JPG
sips -s format png input.jpg --out output.png # JPG → PNG
sips -s format jpeg -s formatOptions 80 input.png --out output.jpg # 压缩 JPG
HEIC/HEIF 支持
ffmpeg -i input.heic output.jpg # HEIC → JPG
ffmpeg -i input.jpg output.heic # JPG → HEIC (需要 x265)
ImageMagick (convert)
convert input.png -quality 80 output.jpg # 压缩 JPG
convert input.png -resize 50% output.png # 缩小 50%
convert input.png -resize 800x output.jpg # 宽度 800px 等比
convert input.jpg -colors 256 output.png # 减少颜色
convert input.png -strip output.png # 去除元数据
GIF 制作
从视频(推荐高压缩):
ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen=stats_mode=full:max_colors=64[p];[s1][p]paletteuse=dither=bayer:bayer_scale=5" -loop 0 output.gif
从视频(高质量):
ffmpeg -i input.mp4 -vf "fps=15,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
参数说明:
fps=N:帧率,越高质量越大scale=W:-1:宽度,高度等比自动计算max_colors=N:调色板颜色数(8-256),越小文件越小loop0:无限循环;loop -1:不循环;loop N:循环 N 次
###图像压缩
JPG 压缩:
ffmpeg -i input.jpg -q:v 2 output.jpg # q:v 1-31,越小质量越高
sips -s format jpeg -s formatOptions 70 input.jpg --out output.jpg
PNG 压缩(pngquant):
pngquant --quality=65-80 --force --output output.png input.png
PNG 优化(optipng):
optipng -o5 input.png # -o1 到 -o7压缩级别
WebP 压缩:
ffmpeg -i input.jpg -c:v libwebp -quality 75 output.webp
GIF 压缩工具
gifsicle(需安装):
gifsicle -O3 --colors128 --lossy 30 -o output.gif input.gif
ffmpeg 重新压缩:
ffmpeg -i input.gif -vf "split[s0][s1];[s0]palettegen=stats_mode=diff[p];[s1][p]paletteuse" -y output.gif
常用参数参考
| 格式 | 质量参数 | 特点 |
|---|---|---|
| JPG | -q:v 2-31 或 -s formatOptions 60-100 | 有损,文件小 |
| PNG | 无损 | 透明背景支持 |
| WebP | -quality 0-100 | 优于 JPG/PNG |
| GIF | fps/colors | 动图,支持透明 |
| HEIC | 有损 | iPhone 默认格式 |
| AVIF | -quality | 极小文件,极高压缩 |
常见问题
GIF 文件太大?
- 降低帧率:
-fps=8 - 缩小尺寸:
-scale=320:-1 - 减少颜色:
-max_colors=64 - 使用 gifsicle 压缩
颜色失真?
使用调色板生成器 palettegen+paletteuse,比默认256 色更好
透明背景丢失? 确保输出格式支持透明(PNG、GIF、WebP),JPG 不支持透明
ffmpeg 报错 "Not found"?
macOS 用 ffmpeg(Homebrew 安装的版本),非 Apple 预装版本
工具检查
which ffmpeg # 检查 ffmpeg
which convert # 检查 ImageMagick
which optipng # 检查 optipng
which pngquant # 检查 pngquant
安全使用建议
Reasonable to install if you want help creating skills. As with any skill-writing assistant, review any generated skill files or optional scripts before using or publishing them, especially if you add credentials, network calls, or automation later.
能力评估
Purpose & Capability
The stated purpose is to guide skill creation, and the reviewed artifact content matches that purpose with requirements gathering, drafting, structure guidance, and user review.
Instruction Scope
Instructions are scoped to user-directed creation of skill files and optional references or utilities; they do not ask the agent to bypass controls, hide behavior, collect unrelated data, or act without user input.
Install Mechanism
The target contains a single non-executable SKILL.md file and no install scripts, binaries, package dependencies, or automatic runtime hooks.
Credentials
Creating SKILL.md, reference files, or optional utility scripts is proportionate to the skill-writing purpose, and there is no broad local indexing, credential use, network access, or unrelated data flow.
Persistence & Privilege
The artifact does not request persistence, background execution, elevated privileges, credential/session access, or long-running workers.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install image-convert - 安装完成后,直接呼叫该 Skill 的名称或使用
/image-convert触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the image-convert skill.
- Supports conversion and compression for PNG, JPG, WebP, GIF, BMP, TIFF, HEIC, AVIF formats.
- Includes video-to-GIF conversion with recommended ffmpeg commands.
- Provides quick command guides for ffmpeg, sips (macOS), ImageMagick, gifsicle, pngquant, and optipng.
- Features common troubleshooting tips and tool verification steps.
- Chinese trigger phrases supported for conversion and compression queries.
元数据
常见问题
image-convert 是什么?
Convert and compress images or videos between formats including PNG, JPG, WebP, GIF, BMP, TIFF, HEIC, AVIF, and create GIFs from videos with adjustable quali... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 34 次。
如何安装 image-convert?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-convert」即可一键安装,无需额外配置。
image-convert 是免费的吗?
是的,image-convert 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
image-convert 支持哪些平台?
image-convert 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 image-convert?
由 Shuguang Tang(@sunnyton)开发并维护,当前版本 v1.0.0。
推荐 Skills