stamp-edge-skill README

The project's README from github.com/xianxie6/stamp-edge-skill. As one markdown file: README.md.

stamp-edge

把任意图片处理成邮票风格的 Agent Skill:四周半圆打孔锯齿边 + 柔和投影,默认无白边、输出真透明背景 PNG(锯齿孔洞与四周 alpha=0),可直接叠加到任意背景上当贴纸/素材使用;可选加白色纸边。还能把多张邮票一键拼成等宽列瀑布流合集图(stamp sheet)。

example

用法

pip install Pillow

# 无白边 + 透明背景(默认)
python3 stamp_effect.py <输入图> <输出图.png>

# 加白色纸边
python3 stamp_effect.py <输入图> <输出图.png> margin

# 浅灰白底成品图(可与 margin 组合)
python3 stamp_effect.py <输入图> <输出图.png> bg

拼合集图

多张邮票生成后,用 stamp_sheet.py 拼成一张合集:等宽列瀑布流,每张邮票撑满列宽、无留白,列高自动贪心均衡。

python3 stamp_sheet.py sheet.png *_stamp.png                      # 默认 4 列深色底
python3 stamp_sheet.py sheet.png --cols 3 --bg "#f5f2ea" -- *_stamp.png

example sheet

作为 Skill 安装

把整个目录放到你的 Agent skills 目录(如 ~/.agents/skills/stamp-edge/),之后对 Agent 说"把这张图做成邮票边"即可触发。

可调参数(脚本顶部)

参数 默认值 说明
margin 0(传 margin 选项时 46) 内容到锯齿边的白边宽度
hole_r 14 打孔半圆半径
pitch 46 打孔间距
outer_pad 90 邮票外留白(投影空间)
shadow_alpha 70 投影不透明度

注意

stamp-edge-skill (xianxie6/stamp-edge-skill)

Searching Database…

What is this?stamp-edge is an agent skill that turns any image into a postage-stamp style card: semicircular perforations punched along all four sides, a soft drop shadow, and a true transparent-background PNG by default (holes and border alpha=0), so the result layers onto any background like a sticker; an optional white paper border is available.
Is this a standalone app, or does my AI agent do the work?It is an agent skill, not an app: you put the whole folder into your agent's skills directory (like ~/.agents/skills/stamp-edge/) and then just tell the agent something like 'turn this image into a stamp edge' to trigger it.
Do I need to install anything besides the skill folder?Nothing is documented: the README names no requirements and the repo ships no dependency manifest, so besides Python itself there is nothing stated to set up.
Any catch when sharing the stamps it produces?Yes — chat apps like WeChat re-encode transparent PNGs as JPG when sent as regular chat images, which kills the transparency; send the stamp as a file if you want to keep it.
Will it run on my Windows machine, or is it Mac-only?The README sets no OS restrictions — it is plain Python, and the repo is tagged for Windows, macOS and Linux, so it should run wherever Python and your agent do.
What is a stamp sheet?Once you have several stamps, the bundled stampsheet.py script merges them into one collage: equal-width waterfall columns where each stamp fills its column edge to edge with no gaps, and column heights are balanced greedily.
Can I tweak how the stamp looks?Yes — the parameters sit at the top of the script: margin (white border width between content and the perforated edge), holer 14 (perforation radius), pitch 46 (hole spacing), outerpad 90 (outer padding reserved for the shadow) and shadowalpha 70 (shadow opacity).
Creator
xianxie6
Size
2.3 MB
Stars
153
Updated
CommitSep 16
Age
2mo
Commits · 90 Days