remove-bg

# SKILL.md - Remove Background Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "remove-bg" with this command: npx skills add jwh-hsm/remove-background

SKILL.md - Remove Background Skill

简介

remove-bg 是一个用于 去除图片单色背景并生成透明 PNG 的本地技能。它基于 Pillow 实现,适合白色、淡灰等亮色背景的图片。

使用方式

在 OpenClaw 中调用技能时,使用以下命令格式:

skill remove-bg <input_image_path> <output_image_path> [threshold]
  • <input_image_path>:待处理的原始图片(任意 Pillow 支持的格式)。
  • <output_image_path>:生成的 PNG(必须以 .png 结尾),会保存透明背景。
  • threshold(可选,默认 200):判断像素是否为背景的亮度阈值。数值越高越保守,适用于背景较暗的情况。

示例

skill remove-bg "C:\Users\Administrator\Pictures\Camera Roll\1108.png" "C:\Users\Administrator\.openclaw\workspace\1108_transparent.png"

若背景不是纯白,可调低阈值:

skill remove-bg "...\photo.jpg" "...\photo_trans.png" 180

实现细节

脚本 remove_bg.py 位于同目录下,使用 Pillow 读取图像、遍历像素并根据阈值将符合条件的像素设为全透明,然后保存为 PNG。


本技能遵守 OpenClaw 安全指南,仅在本地工作区读取/写入文件,不会向外部网络发送数据。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Wechat Mp Writer

WeChat Official Account (公众号) content writer with article formatting, headline optimization, and engagement tips. Use when you need to write WeChat articles,...

Registry SourceRecently Updated
General

OpenClaw EverMemory Installer

Use this skill when installing, upgrading, verifying, or publishing the EverMemory OpenClaw plugin and its companion skill, including local path install, npm...

Registry SourceRecently Updated
General

Ip Advisor

知识产权顾问。专利、版权、商业秘密、注册流程、保护策略。IP advisor for patents, copyrights, trade secrets. 知识产权、专利、版权。

Registry SourceRecently Updated
1950ckchzh
General

炒股大师模拟器

炒股大师模拟器 | 股市模拟交易练习 | A股/港股/美股投资学习 | 化身文主任/股神老徐/炒股养家/孙宇晨等各位大师学习投资思路 | 多智能体股票讨论群

Registry SourceRecently Updated