agentleFS
cafe3310cafe3310/public-agent-skills/skills/wx-emoji-maker/SKILL.md

wx-emoji-maker

Skill258 starsChanged 5 months agoApache-2.0View on GitHub

处理 PNG 图片目录,将其转换为适合微信使用的表情包

  • Installs packages

The file

Files
SKILL.md

技能:wx-emoji-maker

概述

此技能可将一个目录中的 PNG 图片批量处理,使其适合用作微信表情包。此外,它还包含一个用于亚克力冰箱贴等实物周边的子流程,支持为表情包/贴纸图片批量添加自定义版权水印并进行 3% 的小圆角正方形裁剪(圆角外透明)。

关键词: 微信表情, 表情包, 图片处理, PNG, ImageMagick, 水印, 圆角裁切, 亚克力冰箱贴

何时使用此技能

  • 主流程(微信表情制作):
    • 当您有一系列 PNG 图片,并希望将它们快速转换为 240x240 大小、符合微信表情包标准的图片时。
    • 当源图片背景颜色不一,需要统一处理并统一背景颜色时。
  • 子流程(冰箱贴水印与圆角处理):
    • 当您准备用图片制作亚克力冰箱贴,需要批量加上自定义版权标识水印(如 © 2026 cafe3310)时。
    • 需要将实心正方形图片裁切为小圆角(如 3% 的圆角正方形,圆角外侧透明以便于后续制作异形冰箱贴实物)时。

工作流程

主流程:微信表情制作

  1. 准备: 确认系统已安装 ImageMagick。
  2. 执行: 调用 run.sh 脚本,并传入包含 PNG 图片的目录路径:
    /bin/bash <path_to_skill>/scripts/run.sh <图片目录路径>
  3. 交互式检查: 脚本在完成前会暂停,您可以检查 mid3-border 目录下的中间成果,确认无误后按回车键继续。
  4. 完成: 最终表情包成品将保存在目标目录的 res 子目录中。

子流程:冰箱贴水印与圆角处理

  1. 准备: 确认系统已安装 python3 及其 Pillow 库:
    pip install pillow
  2. 执行: 调用 add_watermark.py 脚本:
    python3 <path_to_skill>/scripts/add_watermark.py --thumb
  3. 参数配置: 脚本内置了针对冰箱贴最佳打印效果的默认参数:
    • 字体: M_PLUS_Rounded_1c Medium(默认,圆体字)
    • 水印: © 2026 cafe3310
    • 尺寸: 108px,透明度 60%,右下角对齐(X偏距 150px,Y偏距 100px,字符间距 0.85 紧凑)
    • 裁剪: 3% 圆角正方形(圆角外透明)
    • 如需调整,可通过命令行参数进行微调。例如:
      • 更改水印内容:-t "© 2026 cafe3310"
      • 不进行圆角裁剪:--round-ratio 0
      • 调整透明度:-p 0.40
      • 更改字体大小:--size 86

最佳实践

  • 表情制作: 确保输入目录只包含你想制作成微信表情的 PNG。在暂停检查阶段务必确认 mid3-border 的边界符合预期。
  • 水印圆角: 如果使用字间距缩紧,该脚本使用 Python Pillow 逐字计算前进量,能保证右下角的水印即使在改变字距后依然精确贴合右边缘 150px 的安全偏距。

常见陷阱

  • 依赖缺失: 未安装 ImageMagick 或未安装 Python Pillow 库会导致相应流程执行失败。
  • 百分号转义: 在命令行使用 Python 脚本的 --letter-spacing 帮助信息时,Pillow 会做格式化解析,请在编辑时确保 %% 转义。

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.