
Gemini Watermark Remove
- 33 installs
- 7 repo stars
- Updated January 20, 2026
- kevintsai1202/geminiwatermarkremoveskill
Helps with ai & agent building tasks.
About
gemini-watermark-remove is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- gemini-watermark-remove
- AI & Agent Building
- AI-coding skill
Gemini Watermark Remove by the numbers
- 33 all-time installs (skills.sh)
- +2 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #8,944 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kevintsai1202/geminiwatermarkremoveskill --skill gemini-watermark-removeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 33 |
|---|---|
| repo stars | ★ 7 |
| Last updated | January 20, 2026 |
| Repository | kevintsai1202/geminiwatermarkremoveskill ↗ |
What it does
Helps with ai & agent building tasks.
Files
Gemini 浮水印移除工具
移除 Google Gemini AI 生成圖片中的浮水印。完全在本地執行,無需上傳圖片至任何伺服器。
使用方式
方式一:npx(推薦)
# 直接執行,無需安裝
npx gemini-watermark-remove <圖片路徑>
# 範例
npx gemini-watermark-remove image.png
npx gemini-watermark-remove image.png --output clean.png
npx gemini-watermark-remove image.png --mode large --gain 1.5方式二:Node.js(npx 失敗時使用)
若 npx 執行失敗,可改用 Node.js 直接執行腳本:
# 1. 先安裝相依套件
cd <skill目錄>
npm install
# 2. 執行腳本
node scripts/remove-watermark.js <圖片路徑>
# 範例
node scripts/remove-watermark.js image.png
node scripts/remove-watermark.js image.png --output clean.png
node scripts/remove-watermark.js image.png --mode large --gain 1.5參數
| 參數 | 說明 | 預設值 |
|---|---|---|
-o, --output | 輸出檔案路徑 | {檔名}_clean.{副檔名} |
-m, --mode | 遮罩模式:auto, small, large | auto |
-g, --gain | Alpha 增益值 (1.0-3.0) | 1.0 |
批次處理
Get-ChildItem "*.png" | ForEach-Object { npx gemini-watermark-remove $_.FullName }技術原理
逆向 Alpha 混合演算法:原始像素 = (當前像素 - α × 浮水印顏色) / (1 - α)
- ≤1024px: 48×48 遮罩,邊距 32px
- >1024px: 96×96 遮罩,邊距 64px
連結
- npm: https://www.npmjs.com/package/gemini-watermark-remove
- GitHub: https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill
授權
MIT License
node_modules/
*.log
test_output.png
package-lock.json
MIT License
Copyright (c) 2024 kevintsai1202
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{
"name": "gemini-watermark-remove",
"version": "1.0.0",
"description": "移除 Google Gemini AI 生成圖片中的浮水印",
"main": "scripts/remove-watermark.js",
"bin": {
"gemini-watermark-remove": "scripts/remove-watermark.js"
},
"files": [
"scripts",
"assets"
],
"scripts": {
"start": "node scripts/remove-watermark.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill.git"
},
"keywords": [
"gemini",
"watermark",
"remove",
"ai",
"image",
"tool"
],
"author": "kevintsai1202",
"license": "MIT",
"bugs": {
"url": "https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill/issues"
},
"homepage": "https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill#readme",
"dependencies": {
"sharp": "^0.33.0"
}
}
Gemini Watermark Remove Skill
 
繁體中文
Remove watermarks from Google Gemini AI generated images (Nano Banana).
✨ Features
- 🚫 Automatically remove Gemini watermarks
- 🔒 Fully local processing, protecting privacy
- ⚡ Batch processing support
- 🎯 Auto-detect image size and select appropriate mask
📦 Installation
Method 1: npx add-skill (Recommended)
Use add-skill for quick installation to various AI agents.
Auto-detect installed agents
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkillInstall to specific agent
# Install to Antigravity
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a antigravity -g -y
# Install to Claude Code
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a claude-code -g -y
# Install to Cursor
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a cursor -g -y
# Install to Roo Code
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a roo -g -y
# Install to Gemini CLI
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a gemini-cli -g -yParameters:
-a, --agent <agents...>: Specify target agent-g, --global: Install to global directory-y, --yes: Skip confirmation prompt
Method 2: Git Clone
# Clone to Antigravity skills directory
git clone https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill.git ~/.gemini/antigravity/skills/gemini-watermark-remove
# Clone to Claude Code skills directory
git clone https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill.git ~/.claude/skills/gemini-watermark-removeMethod 3: Manual Installation
1. Download ZIP or clone this repository 2. Copy the folder to the corresponding skills directory:
- Antigravity:
~/.gemini/antigravity/skills/ - Claude Code:
~/.claude/skills/
Verify Installation
Restart your AI agent or reload skills, then invoke through AI conversation.
🚀 Usage
After installing this Skill, invoke it through AI conversation:
Single Image
"Remove the watermark from this image: D:\images\photo.png"
Batch Processing
"Batch remove watermarks from all images in D:\images folder"
🛠️ Technical Principle
Uses reverse Alpha blending algorithm to precisely restore pixels covered by watermarks:
Original Pixel = (Current Pixel - α × Watermark Color) / (1 - α)Auto-select mask based on image size:
- ≤1024px: Use 48×48 mask
- >1024px: Use 96×96 mask
📄 License
MIT License
Gemini Watermark Remove Skill
 
English
移除 Google Gemini AI 生成圖片中的浮水印 (Nano Banana)。
✨ 功能
- 🚫 自動移除 Gemini 浮水印
- 🔒 完全本地處理,保護隱私
- ⚡ 支援批次處理
- 🎯 自動偵測圖片尺寸並選擇適當遮罩
📦 安裝方式
方式一:透過 npx add-skill 安裝(推薦)
使用 add-skill 工具可以快速安裝到各種 AI 代理程式。
自動偵測已安裝的代理程式
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill安裝到特定代理程式
# 安裝到 Antigravity
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a antigravity -g -y
# 安裝到 Claude Code
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a claude-code -g -y
# 安裝到 Cursor
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a cursor -g -y
# 安裝到 Roo Code
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a roo -g -y
# 安裝到 Gemini CLI
npx add-skill kevintsai1202/GeminiWatermarkRemoveSkill -a gemini-cli -g -y參數說明:
-a, --agent <agents...>:指定要安裝的代理程式-g, --global:安裝到全域目錄-y, --yes:跳過確認提示
方式二:透過 Git 複製
# 複製到 Antigravity 的 skills 目錄
git clone https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill.git ~/.gemini/antigravity/skills/gemini-watermark-remove
# 複製到 Claude Code 的 skills 目錄
git clone https://github.com/kevintsai1202/GeminiWatermarkRemoveSkill.git ~/.claude/skills/gemini-watermark-remove方式三:手動安裝
1. 下載本專案的 ZIP 檔案或複製到本機 2. 將資料夾複製到對應工具的技能目錄:
- Antigravity:
~/.gemini/antigravity/skills/ - Claude Code:
~/.claude/skills/
驗證安裝
重新啟動 AI 代理程式或重新載入 skills,然後透過 AI 對話調用即可。
🚀 使用方式
安裝此 Skill 後,透過 AI 對話即可調用:
單張圖片
"幫我移除這張圖片的浮水印:D:\images\photo.png"
批次處理
"批次移除 D:\images 資料夾內所有圖片的浮水印"
🛠️ 技術原理
使用逆向 Alpha 混合演算法精確還原被浮水印覆蓋的像素:
原始像素 = (當前像素 - α × 浮水印顏色) / (1 - α)根據圖片尺寸自動選擇遮罩:
- ≤1024px: 使用 48×48 遮罩
- >1024px: 使用 96×96 遮罩
📄 授權
MIT License
#!/usr/bin/env node
/**
* Gemini 浮水印移除腳本
* 使用逆向 Alpha 混合演算法移除 Google Gemini 生成圖片中的浮水印
*/
const fs = require('fs');
const path = require('path');
const sharp = require('sharp');
// 常數定義
const CONSTANTS = {
LARGE_THRESHOLD: 1024, // 大圖片閾值
MARGIN_LARGE: 64, // 大圖片邊距
MARGIN_SMALL: 32, // 小圖片邊距
LOGO_VALUE: 255.0, // 浮水印顏色值(白色)
ALPHA_THRESHOLD: 0.002, // Alpha 門檻值
MAX_ALPHA: 0.99 // 最大 Alpha 值
};
// 載入遮罩圖片並提取 Alpha 通道
async function loadMask(maskPath) {
const maskBuffer = await sharp(maskPath)
.raw()
.toBuffer({ resolveWithObject: true });
const { data, info } = maskBuffer;
const { width, height, channels } = info;
// 計算 Alpha 值(使用最大 RGB 值)
const alphas = new Float32Array(width * height);
for (let i = 0; i < width * height; i++) {
const pixelOffset = i * channels;
const r = data[pixelOffset];
const g = data[pixelOffset + 1];
const b = data[pixelOffset + 2];
const maxVal = Math.max(r, Math.max(g, b));
alphas[i] = maxVal / 255.0;
}
return { width, height, alphas };
}
// 移除浮水印核心演算法
function removeWatermark(imageData, width, height, mask, config) {
const { forceMode, alphaGain } = config;
// 1. 決定使用的遮罩模式
let mode = forceMode;
if (mode === 'auto') {
mode = (width > CONSTANTS.LARGE_THRESHOLD && height > CONSTANTS.LARGE_THRESHOLD)
? 'large' : 'small';
}
// 2. 取得對應的遮罩與邊距
const currentMask = mask[mode];
if (!currentMask) {
throw new Error(`遮罩 ${mode} 未載入`);
}
const margin = mode === 'large' ? CONSTANTS.MARGIN_LARGE : CONSTANTS.MARGIN_SMALL;
// 3. 計算浮水印位置(右下角)
const posX = width - margin - currentMask.width;
const posY = height - margin - currentMask.height;
if (posX < 0 || posY < 0) {
console.log('圖片尺寸過小,跳過處理');
return imageData;
}
console.log(`使用 ${mode} 模式,浮水印位置: (${posX}, ${posY})`);
// 4. 處理每個像素
const data = imageData;
const channels = 3; // RGB
for (let my = 0; my < currentMask.height; my++) {
for (let mx = 0; mx < currentMask.width; mx++) {
const iy = posY + my;
const ix = posX + mx;
if (ix >= width || iy >= height) continue;
const mIdx = my * currentMask.width + mx;
let alpha = currentMask.alphas[mIdx] * alphaGain;
if (alpha < CONSTANTS.ALPHA_THRESHOLD) continue;
if (alpha > CONSTANTS.MAX_ALPHA) alpha = CONSTANTS.MAX_ALPHA;
const oneMinusAlpha = 1.0 - alpha;
const idx = (iy * width + ix) * channels;
// 逆向 Alpha 混合還原每個顏色通道
for (let c = 0; c < 3; c++) {
const currentVal = data[idx + c];
let original = (currentVal - alpha * CONSTANTS.LOGO_VALUE) / oneMinusAlpha;
if (original < 0) original = 0;
if (original > 255) original = 255;
data[idx + c] = Math.round(original);
}
}
}
return data;
}
// 解析命令列參數
function parseArgs(args) {
const result = {
input: null,
output: null,
mode: 'auto',
gain: 1.0
};
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (arg === '--output' || arg === '-o') {
result.output = args[++i];
} else if (arg === '--mode' || arg === '-m') {
result.mode = args[++i];
} else if (arg === '--gain' || arg === '-g') {
result.gain = parseFloat(args[++i]);
} else if (!arg.startsWith('-') && !result.input) {
result.input = arg;
}
}
return result;
}
// 主函式
async function main() {
const args = process.argv.slice(2);
if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
console.log(`
Gemini 浮水印移除工具
使用方式:
node remove-watermark.js <輸入圖片> [選項]
選項:
-o, --output <路徑> 輸出檔案路徑 (預設: 輸入檔名_clean)
-m, --mode <模式> 遮罩模式: auto, small, large (預設: auto)
-g, --gain <數值> Alpha 增益值 1.0-3.0 (預設: 1.0)
-h, --help 顯示此說明
範例:
node remove-watermark.js image.png
node remove-watermark.js image.png -o clean.png -m large
`);
process.exit(0);
}
// 解析參數
const config = parseArgs(args);
if (!config.input) {
console.error('錯誤: 請指定輸入圖片路徑');
process.exit(1);
}
if (!fs.existsSync(config.input)) {
console.error(`錯誤: 找不到檔案 ${config.input}`);
process.exit(1);
}
// 設定輸出路徑
if (!config.output) {
const ext = path.extname(config.input);
const base = path.basename(config.input, ext);
const dir = path.dirname(config.input);
config.output = path.join(dir, `${base}_clean${ext}`);
}
console.log(`處理圖片: ${config.input}`);
console.log(`輸出路徑: ${config.output}`);
try {
// 載入遮罩
const skillDir = path.dirname(__dirname);
const mask = {
small: await loadMask(path.join(skillDir, 'assets', 'mask_48.png')),
large: await loadMask(path.join(skillDir, 'assets', 'mask_96.png'))
};
console.log('遮罩載入完成');
// 載入並處理圖片
const image = sharp(config.input);
const metadata = await image.metadata();
const { width, height } = metadata;
console.log(`圖片尺寸: ${width} x ${height}`);
// 取得 RGB 像素資料
const rawBuffer = await image.removeAlpha().raw().toBuffer();
const imageData = new Uint8Array(rawBuffer);
// 移除浮水印
const processedData = removeWatermark(imageData, width, height, mask, {
forceMode: config.mode,
alphaGain: config.gain
});
// 儲存處理後的圖片
await sharp(Buffer.from(processedData), {
raw: {
width,
height,
channels: 3
}
}).toFile(config.output);
console.log(`✅ 處理完成: ${config.output}`);
} catch (error) {
console.error(`錯誤: ${error.message}`);
process.exit(1);
}
}
main();