闲社服务运行正常AI智能体自动化平台
i

图像处理工具

技能标识:image-process

Image processing tool for compression, background removal/replacement, and upscaling. Invoke when user wants to compress image, remove background, change background, or enlarge image.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

图像处理工具

图像处理技能

该技能提供图像处理能力,包括压缩、背景移除、背景替换和图像放大。

功能特性

  • - 图像压缩:通过可调节质量参数压缩图像以减小文件大小
  • 背景移除:使用@imgly/background-removal实现AI驱动的背景移除
  • 背景替换:用自定义颜色或另一张图像替换背景
  • 图像放大:将图像放大至更大尺寸

使用方法

1. 压缩图像

javascript
const { compressImage } = require(./index);

const result = await compressImage({
input: ./image.jpg,
quality: 80,
output: ./compressed.jpg
});

2. 移除背景

javascript
const { removeBackground } = require(./index);

const result = await removeBackground({
input: ./person.jpg,
output: ./person-nobg.png
});

3. 替换背景

javascript
const { replaceBackground } = require(./index);

// 替换为纯色
const result = await replaceBackground({
input: ./person.jpg,
background: #ffffff,
output: ./result.jpg
});

// 替换为另一张图像
const result = await replaceBackground({
input: ./person.jpg,
background: ./background.jpg,
output: ./result.jpg
});

4. 放大图像

javascript
const { upscaleImage } = require(./index);

// 按倍数缩放(2倍)
const result = await upscaleImage({
input: ./image.jpg,
scale: 2,
output: ./upscaled.jpg
});

// 或指定精确尺寸
const result = await upscaleImage({
input: ./image.jpg,
width: 2000,
height: 3000,
output: ./upscaled.jpg
});

参数说明

compressImage

参数类型描述
inputstring输入图像路径
quality
number | 压缩质量(1-100),默认80 | | output | string | 输出文件路径 |

removeBackground

参数类型描述
inputstring/Buffer输入图像的路径或缓冲区
output
string | 输出文件路径(可选) |

replaceBackground

参数类型描述
inputstring前景图像路径
background
string | 十六进制颜色(如#ffffff)或背景图像路径 | | output | string | 输出文件路径 |

upscaleImage

参数类型描述
inputstring输入图像路径
scale
number | 缩放倍数(如2表示2倍),默认2 | | width | number | 目标宽度(覆盖scale参数) | | height | number | 目标高度(覆盖scale参数) | | output | string | 输出文件路径 |

CLI命令

bash

压缩


image-process compress ./photo.jpg -q 80

移除背景

image-process remove-bg ./person.jpg

替换背景

image-process replace-bg ./person.jpg #ffffff image-process replace-bg ./person.jpg ./background.jpg

放大

image-process upscale ./photo.jpg -s 2 image-process upscale ./photo.jpg -w 2000 -h 3000

安装

bash
cd E:\cvte\skills\image-process
npm install

依赖项

  • - @imgly/background-removal-node - AI背景移除
  • sharp - 高性能图像处理

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 image-process-1776281659 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 image-process-1776281659 技能

通过命令行安装

skillhub install image-process-1776281659

下载

⬇ 下载 image-process v0.1.0(免费)

文件大小: 14.82 KB | 发布时间: 2026-4-16 16:54

v0.1.0 最新 2026-4-16 16:54
Initial release of the image-process skill:

- Compress images to reduce file size with adjustable quality settings.
- Remove image backgrounds using AI-powered tools.
- Replace image backgrounds with a solid color or a custom image.
- Upscale images by a chosen factor or to specific dimensions.
- Includes CLI commands and programmatic usage examples.
返回顶部