wechat-sticker-maker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

微信表情包制作工具 (WeChat Sticker Maker)

WeChat Sticker Maker

本 Skill 旨在帮助用户快速将设计好的网格拼图(如六宫格、九宫格、十二宫格)自动裁剪并生成符合微信表情开放平台规范的素材。
This Skill is designed to help users quickly automatically crop grid-based sticker designs (such as 6-grid, 9-grid, 12-grid layouts) and generate materials that meet the specifications of the WeChat Sticker Open Platform.

核心功能

Core Features

  • 自动裁剪:支持 2x3, 3x2, 3x3, 3x4, 4x3 等多种网格布局。
  • 智能去底:支持一键自动移除背景(需开启
    --remove-bg
    参数)。
    • 注意:本 Skill 内置的去底功能基于
      rembg
      (U2Net),对于简单背景效果尚可,但对于复杂边缘(如发丝、半透明区域)处理可能不如 Photoshop 或专业在线修图工具完美。建议优先生成透明背景的原图,或手动精修后再使用本工具切图。
  • 规范转换
    • 表情主图:统一调整为 240x240 像素 (PNG)。
    • 聊天页图标:统一调整为 50x50 像素 (PNG)。
  • 含义词生成:自动生成
    meta.txt
    文件,预留“含义词”填写位置,方便批量管理。
  • 信息模板生成:自动生成
    info.txt
    文件,包含【表情名称】、【表情介绍】、【一句话简介】的填写模板及字数限制提示。
  • 候选素材生成:自动提取第1张表情,生成符合规范的【头像/封面图候选】(240x240) 和 【聊天页图标候选】(50x50)。
  • 自动命名:按照微信规范自动编号 (01, 02, ...)。
  • Automatic Cropping: Supports multiple grid layouts including 2x3, 3x2, 3x3, 3x4, 4x3.
  • Smart Background Removal: One-click automatic background removal (requires enabling the
    --remove-bg
    parameter).
    • Note: The built-in background removal function of this Skill is based on
      rembg
      (U2Net). It works well for simple backgrounds, but may not handle complex edges (such as hair strands, translucent areas) as perfectly as Photoshop or professional online photo editing tools. It is recommended to generate original images with transparent backgrounds first, or manually retouch the images before using this tool for cropping.
  • Specification Conversion:
    • Main Sticker Image: Uniformly adjusted to 240x240 pixels (PNG).
    • Chat Page Icon: Uniformly adjusted to 50x50 pixels (PNG).
  • Meaning Word Generation: Automatically generates a
    meta.txt
    file with reserved fields for "meaning words" to facilitate batch management.
  • Information Template Generation: Automatically generates an
    info.txt
    file, including fill-in templates and word count limit prompts for [Sticker Name], [Sticker Introduction], and [One-sentence Summary].
  • Candidate Material Generation: Automatically extracts the first sticker to generate compliant [Avatar/Cover Image Candidate] (240x240) and [Chat Page Icon Candidate] (50x50).
  • Automatic Naming: Automatically numbers files according to WeChat specifications (01, 02, ...).

使用指南

Usage Guide

1. 快速开始 (Quick Start)

1. Quick Start

无需手动安装依赖,直接运行脚本即可。工具会自动创建虚拟环境 (
.venv
) 并安装所需依赖。
bash
undefined
No need to manually install dependencies; simply run the script. The tool will automatically create a virtual environment (
.venv
) and install the required dependencies.
bash
undefined

基本用法:自动处理并生成

Basic usage: Automatically process and generate

./skills/wechat-sticker-maker/scripts/run.sh /path/to/your/grid_image.png
./skills/wechat-sticker-maker/scripts/run.sh /path/to/your/grid_image.png

常用选项:

Common options:

- 自动去底 (需要网络下载模型)

- Automatic background removal (requires network to download model)

./skills/wechat-sticker-maker/scripts/run.sh /path/to/image.png --remove-bg
./skills/wechat-sticker-maker/scripts/run.sh /path/to/image.png --remove-bg

- 指定布局 (例如 3x3)

- Specify layout (e.g., 3x3)

./skills/wechat-sticker-maker/scripts/run.sh /path/to/image.png --layout 3x3
./skills/wechat-sticker-maker/scripts/run.sh /path/to/image.png --layout 3x3

- 指定输出目录

- Specify output directory

./skills/wechat-sticker-maker/scripts/run.sh /path/to/image.png --output ./my_stickers
undefined
./skills/wechat-sticker-maker/scripts/run.sh /path/to/image.png --output ./my_stickers
undefined

2. (可选) 手动安装

2. (Optional) Manual Installation

如果您希望手动管理环境:
bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r skills/wechat-sticker-maker/requirements.txt
python3 skills/wechat-sticker-maker/scripts/make_stickers.py ...
If you prefer to manage the environment manually:
bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r skills/wechat-sticker-maker/requirements.txt
python3 skills/wechat-sticker-maker/scripts/make_stickers.py ...

3. 输出结果

3. Output Results

脚本将在输出目录下生成三个文件夹和更多文件:
  • main/
    : 存放 表情主图 (240x240)
  • icon/
    : 存放 表情缩略图标 (50x50, 这里的icon指每张表情的缩略图,非聊天页单一图标)
  • meta.txt
    : 含义词配置表 (格式:
    01.png [请输入表情含义]
    )
  • info.txt
    : 专辑信息模板 (包含名称、简介模板)
  • cover_candidate.png
    : 封面图候选 (240x240, 取自第1张)
  • chat_icon_candidate.png
    : 聊天页图标候选 (50x50, 取自第1张)
The script will generate three folders and additional files in the output directory:
  • main/
    : Stores main sticker images (240x240)
  • icon/
    : Stores sticker thumbnail icons (50x50; here, "icon" refers to the thumbnail of each sticker, not the single chat page icon)
  • meta.txt
    : Meaning Word Configuration Table (Format:
    01.png [Please enter sticker meaning]
    )
  • info.txt
    : Album Information Template (Includes name and introduction templates)
  • cover_candidate.png
    : Cover Image Candidate (240x240, extracted from the first sticker)
  • chat_icon_candidate.png
    : Chat Page Icon Candidate (50x50, extracted from the first sticker)

规范参考

Specification Reference