← 返回
内容创作 中文

Image Process

Image processing tool for compression, background removal/replacement, and upscaling. Invoke when user wants to compress image, remove background, change bac...
图像处理工具,支持压缩、去除/替换背景及放大。当用户需压缩图像、去除背景、更换背景时调用。
sanford284
内容创作 clawhub v0.1.0 1 版本 99812 Key: 无需
★ 0
Stars
📥 2,654
下载
💾 9
安装
1
版本
#latest

概述

Image Process Skill

This skill provides image processing capabilities including compression, background removal, background replacement, and upscaling.

Features

  • Image Compression: Compress images to reduce file size with adjustable quality
  • Background Removal: AI-powered background removal using @imgly/background-removal
  • Background Replacement: Replace background with a custom color or another image
  • Image Upscaling: Enlarge images to bigger dimensions

Usage

1. Compress Image

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

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

2. Remove Background

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

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

3. Replace Background

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

// Replace with solid color
const result = await replaceBackground({
  input: './person.jpg',
  background: '#ffffff',
  output: './result.jpg'
});

// Replace with another image
const result = await replaceBackground({
  input: './person.jpg',
  background: './background.jpg',
  output: './result.jpg'
});

4. Upscale Image

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

// Scale by factor (2x)
const result = await upscaleImage({
  input: './image.jpg',
  scale: 2,
  output: './upscaled.jpg'
});

// Or specify exact dimensions
const result = await upscaleImage({
  input: './image.jpg',
  width: 2000,
  height: 3000,
  output: './upscaled.jpg'
});

Parameters

compressImage

ParameterTypeDescription
------------------------------
inputstringPath to input image
qualitynumberCompression quality (1-100), default 80
outputstringOutput file path

removeBackground

ParameterTypeDescription
------------------------------
inputstring/BufferPath or buffer of input image
outputstringOutput file path (optional)

replaceBackground

ParameterTypeDescription
------------------------------
inputstringPath to foreground image
backgroundstringHex color (e.g. '#ffffff') or path to background image
outputstringOutput file path

upscaleImage

ParameterTypeDescription
------------------------------
inputstringPath to input image
scalenumberScale factor (e.g. 2 for 2x), default 2
widthnumberTarget width (overrides scale)
heightnumberTarget height (overrides scale)
outputstringOutput file path

CLI Commands

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

# Remove background
image-process remove-bg ./person.jpg

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

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

Installation

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

Dependencies

  • @imgly/background-removal-node - AI background removal
  • sharp - High-performance image processing

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-30 00:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,707
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,472
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,183