← 返回 Skills 市场
kanocifer

Imgae Convert Skill

作者 LiuDeTao · GitHub ↗ · v0.1.2 · MIT-0
cross-platform ✓ 安全检测通过
154
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install image-convert-skill
功能描述
使用 Pillow 支持常见图像格式(PNG、JPEG、GIF、BMP、TIFF、WebP)之间的相互转换和格式不变的压缩,支持质量控制、尺寸缩放和无损压缩模式。
使用说明 (SKILL.md)

Image Converter Skill

支持常见图像格式相互转换或保留原格式压缩的自动化工具,使用前请确保已安装 Pillow 库:

pip install Pillow

# 或使用uv
uv add Pillow

目标格式优先级 (Target Format Precedence)

  1. --to-format 标志(最高优先级)
  2. 明确的输出文件扩展名
  3. 默认行为:
    • 默认:目录转换且未明确指定格式时转换为 WebP
    • --compress 模式:保留输入格式

快速开始 / Usage Examples

Basic Format Conversion

Convert PNG to JPEG:

python scripts/convert.py input.png output.jpg

Convert WebP to PNG:

python scripts/convert.py input.webp output.png

Convert all images in a directory to PNG:

python scripts/convert.py ./input_dir ./output_dir --to-format png

Explicit Format Specification

Convert JPEG to WebP even if output has .jpg extension:

python scripts/convert.py input.jpg output.jpg --to-format webp

Compression

Compress PNG with quality 75 (preserves format):

python scripts/convert.py input.png output.png --compress --compress-quality 75

Batch Processing (Multiple Files)

Process multiple files using comma-separated list, glob patterns, or wildcard:

# Comma-separated files
python scripts/convert.py "img1.png,img2.jpg,img3.webp" output_dir/ --to-format png

# Glob pattern
python scripts/convert.py "*.jpg" output_dir/ --to-format webp

# Multiple patterns
python scripts/convert.py "*.png,*.jpg" output_dir/ --to-format webp

# Parallel processing (4 threads)
python scripts/convert.py "*.jpg" output_dir/ --threads 4

# Verbose output
python scripts/convert.py "*.jpg" output_dir/ -v

WebP Conversion (Legacy Usage Still Works)

Convert JPEG to WebP with quality 85:

python scripts/convert.py input.jpg output.webp --quality 85

Convert directory to WebP (keeps original files):

python scripts/convert.py ./images/ ./webp_output/

Lossless compression:

python scripts/convert.py input.png output.webp --lossless

Scale image (longest edge 1920px):

python scripts/convert.py input.jpg output.webp --max-size 1920

Batch compress directory (preserves format):

python scripts/convert.py ./images/ ./compressed/ --compress

功能列表

功能 说明
相互转换 支持常见图像格式之间的相互转换
批量转换 支持目录、文件列表、逗号分隔、通配符输入
并行处理 多线程批量转换加速
质量控制 有损压缩质量 1-100
无损模式 保持原始像素质量
尺寸缩放 按最长边等比缩放
色彩空间 自动转换 CMYK→RGB,调色板→RGBA
元数据 清除 EXIF,保留 ICC 配置文件
格式保留压缩 保留原格式进行压缩(PNG/JPEG/GIF/WebP/TIFF)

CLI 参数

转换参数 (Conversion Options)

参数 说明 默认值
--to-format 明确指定目标格式 (jpeg, png, webp, gif, bmp, tiff),优先级高于输出扩展名
--quality 压缩质量 (1-100) 90
--max-size 最长边缩放像素 不缩放
--lossless 启用无损压缩 False

压缩参数(保留原格式)

参数 说明 默认值
--compress 启用压缩模式,保留原格式 False
--compress-quality 压缩质量 (1-100) 85
--compress-level PNG/TIFF 压缩级别 (0-9) 6

批量处理参数

参数 说明 默认值
--threads 并行处理线程数 1
--verbose, -v 显示详细进度信息 False

参考

详细 WebP 参数配置请查看 webp_settings.md

安全使用建议
This skill appears to do exactly what it says: convert and compress images using Pillow. Before installing or running it, consider: 1) install Pillow from the official PyPI (pip install Pillow) in a virtualenv to avoid contaminating system Python; ignore or verify the 'uv add' instruction if you don't know that tool; 2) inspect/track the included scripts (you already have them); run them on test images first and avoid giving it sensitive files — the script reads and writes local image files and can create output directories; 3) be aware that processing large or malformed images can consume CPU/memory (deny large uploads or limit --threads); 4) the skill source/homepage is unknown and the published name has a typo, which could indicate low maintenance — if you rely on this in production, prefer a package from a known repository or maintain your own copy. Overall the bundle is internally consistent and does not show signs of data exfiltration or unrelated access.
功能分析
Type: OpenClaw Skill Name: image-convert-skill Version: 0.1.2 The skill bundle is a legitimate image conversion utility using the Pillow library. The main script `scripts/convert.py` provides robust functionality for format conversion, resizing, and batch processing with no evidence of malicious behavior, data exfiltration, or suspicious instructions.
能力评估
Purpose & Capability
The name/description (image conversion, compression, resizing) align with the included CLI script (scripts/convert.py) and the reference doc. Required capabilities are limited to Pillow; no unrelated credentials, binaries, or host services are requested. Minor notes: the published skill name has a typo ('Imgae') and the package source/homepage are unknown, but these are metadata issues, not functional mismatches.
Instruction Scope
SKILL.md limits runtime actions to installing Pillow (pip) and running the provided convert script with local files/dirs and CLI flags. The instructions do not ask the agent to read unrelated system files, environment variables, or contact external endpoints. Note: the doc mentions 'uv add Pillow' (a nonstandard/unknown package manager invocation) — this is unusual but not harmful by itself.
Install Mechanism
There is no automated install spec (instruction-only), so nothing is written to disk by an installer beyond running the included script. The README instructs the user to pip install Pillow (standard). Because there's no download/install step embedded in the skill bundle, install risk is low.
Credentials
The skill declares no required environment variables or credentials and the script does not access env vars or external secret/config paths. The requested privileges are proportional to an image-conversion tool.
Persistence & Privilege
always is false and model invocation is allowed (the platform default). The skill does not attempt to modify other skills or system-wide settings and does not request permanent presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-convert-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-convert-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
GitHub: https://github.com/KanoCifer/image-convert-skill
v0.1.1
- Initial version supporting conversion and compression between common image formats (PNG, JPEG, GIF, BMP, TIFF, WebP). - Supports batch conversion, comma-separated/wildcard/directory input, with parallel processing for improved efficiency. - Offers lossy/lossless compression, quality control, and resizing capabilities. - Automatically handles color space conversion, removes EXIF data/preserves ICC profiles. - Comprehensive command-line arguments, compatible with old WebP usage, compression mode can preserve original format. - 初始版本,支持常见图像格式(PNG、JPEG、GIF、BMP、TIFF、WebP)之间互转与压缩。 - 支持批量转换、逗号分隔/通配符/目录输入,并行处理提升效率。 - 提供有损/无损压缩、质量控制、尺寸缩放等功能。 - 自动处理色彩空间转换,清除EXIF/保留ICC配置文件。 - 命令行参数全面,兼容旧的WebP用法,压缩模式可保留原格式。
元数据
Slug image-convert-skill
版本 0.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Imgae Convert Skill 是什么?

使用 Pillow 支持常见图像格式(PNG、JPEG、GIF、BMP、TIFF、WebP)之间的相互转换和格式不变的压缩,支持质量控制、尺寸缩放和无损压缩模式。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 154 次。

如何安装 Imgae Convert Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-convert-skill」即可一键安装,无需额外配置。

Imgae Convert Skill 是免费的吗?

是的,Imgae Convert Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Imgae Convert Skill 支持哪些平台?

Imgae Convert Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Imgae Convert Skill?

由 LiuDeTao(@kanocifer)开发并维护,当前版本 v0.1.2。

💬 留言讨论