image_processor
Skill1 starsChanged 5 months agoMITView on GitHub
图片处理器 - 批量压缩、格式转换、尺寸调整、加水印
- Installs packages
In this repository13 other files it gives its agents.
- batch_renamerSkill
- data_processorSkill
- directory_treeSkill
- ffmpeg_processorSkill
- file_comparatorSkill
- file_organizerSkill
- image_downloaderSkill
- password_generatorSkill
- pdf_toolSkill
- pdf-word-converterSkill
- sftp_toolSkill
- web-crawlerSkill
- wechat_image_downloaderSkill
The file
Files
Image Processor Skill
图片批量处理工具,日常办公必备!
功能特性
📐 尺寸调整
- 调整尺寸: 自定义宽高,自动保持宽高比
- 旋转图片: 90/180/270 度旋转
📦 格式压缩
- 格式转换: JPEG/PNG/WEBP/BMP 互转
- 批量压缩: 压缩图片大小,保持画质
- 质量控制: 0-100 质量可调
🖼️ 水印处理
- 添加水印: 支持多位置、透明度调整
- 批量水印: 一键给多张图加水印
📊 信息查看
- 获取信息: 尺寸、格式、大小等信息
- 批量操作: 一键处理整个文件夹
使用方法
Python API
from skills.image_processor import ImageProcessor
img = ImageProcessor()
# 检查是否可用
if not img.is_available():
print("请先安装: pip install Pillow")
exit(1)
# 调整尺寸
img.resize_image('input.jpg', 'output.jpg', 800, 600)
# 转换格式
img.convert_format('input.png', 'output.jpg', format='JPEG', quality=85)
# 压缩图片
img.compress_image('input.jpg', 'compressed.jpg', quality=70)
# 添加水印
img.add_watermark('input.jpg', 'output.jpg', 'watermark.png', position='se', opacity=0.5)
# 批量压缩
success, failed = img.batch_process('input_dir', 'output_dir', img.compress_image, quality=75)API 参考
ImageProcessor 类
图片处理
resize_image(image_path, output_path, width, height, keep_ratio=True)- 调整尺寸rotate_image(image_path, output_path, angle)- 旋转图片convert_format(image_path, output_path, format='JPEG', quality=85)- 转换格式compress_image(image_path, output_path, quality=75)- 压缩图片add_watermark(image_path, output_path, watermark_path, position='se', opacity=0.5)- 添加水印
批量操作
batch_process(input_dir, output_dir, process_func, file_ext=None, **kwargs)- 批量处理
信息查看
get_info(image_path)- 获取图片信息is_available()- 检查是否可用
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

