@pilio/gemini-watermark-remover 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -10
- package/README_zh.md +8 -1
- package/package.json +10 -2
- package/src/core/candidateSelector.js +758 -96
- package/src/core/geminiSizeCatalog.js +129 -15
- package/src/core/selectionDebug.js +46 -0
- package/src/core/watermarkProcessor.js +132 -31
- package/src/core/watermarkScoring.js +140 -0
package/README.md
CHANGED
|
@@ -127,11 +127,17 @@ node bin/gwr.mjs remove <input> --output <file>
|
|
|
127
127
|
gwr remove <input> [--output <file> | --out-dir <dir>] [--overwrite] [--json]
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
If you do not have `gwr` installed globally, use:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>
|
|
134
|
-
```
|
|
130
|
+
If you do not have `gwr` installed globally, use:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The default CLI file decoder/encoder uses `sharp`. SDK consumers that only use browser or `ImageData` APIs do not need it. If you use the CLI file path in your own project, install `sharp` alongside this package:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pnpm add sharp
|
|
140
|
+
```
|
|
135
141
|
|
|
136
142
|
### Can't Remove Your Watermark?
|
|
137
143
|
|
|
@@ -255,11 +261,12 @@ const result = await removeWatermarkFromBuffer(inputBuffer, {
|
|
|
255
261
|
- TypedArray (`Float32Array`, `Uint8ClampedArray`)
|
|
256
262
|
- for the website copy button: `navigator.clipboard.write(...)` and `ClipboardItem`
|
|
257
263
|
|
|
258
|
-
### CLI And Skill
|
|
259
|
-
|
|
260
|
-
- a local Node.js runtime capable of running this package
|
|
261
|
-
-
|
|
262
|
-
- for
|
|
264
|
+
### CLI And Skill
|
|
265
|
+
|
|
266
|
+
- a local Node.js runtime capable of running this package
|
|
267
|
+
- `sharp` installed when using the default CLI file decoder/encoder
|
|
268
|
+
- filesystem access for local input/output paths
|
|
269
|
+
- for repo-local usage:
|
|
263
270
|
|
|
264
271
|
```bash
|
|
265
272
|
node bin/gwr.mjs remove <input> --output <file>
|
package/README_zh.md
CHANGED
|
@@ -133,6 +133,12 @@ gwr remove <input> [--output <file> | --out-dir <dir>] [--overwrite] [--json]
|
|
|
133
133
|
pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
默认 CLI 文件解码/编码路径使用 `sharp`。只使用浏览器或 `ImageData` SDK 的消费者不需要它。如果你在自己的项目里使用 CLI 文件处理,请同时安装 `sharp`:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pnpm add sharp
|
|
140
|
+
```
|
|
141
|
+
|
|
136
142
|
### 去不掉的水印?
|
|
137
143
|
|
|
138
144
|
本工具专门针对 Gemini 可见水印(右下角半透明 Logo)。如果你的图片水印不属于 Gemini 已知格式,或需要去除其他类型的图片水印,可以试试通用 AI 去水印工具:
|
|
@@ -257,7 +263,8 @@ const result = await removeWatermarkFromBuffer(inputBuffer, {
|
|
|
257
263
|
|
|
258
264
|
### CLI 与 Skill
|
|
259
265
|
|
|
260
|
-
-
|
|
266
|
+
- 能运行本包的本地 Node.js 环境
|
|
267
|
+
- 使用默认 CLI 文件解码/编码路径时需要安装 `sharp`
|
|
261
268
|
- 可读写本地输入/输出路径的文件系统环境
|
|
262
269
|
- 在仓库内可直接使用:
|
|
263
270
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pilio/gemini-watermark-remover",
|
|
3
3
|
"description": "Automatically removes watermarks from Gemini AI generated images",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"author": "GargantuaX",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"files": [
|
|
@@ -54,13 +54,19 @@
|
|
|
54
54
|
"import": "./src/runtime/userscript.js"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"
|
|
57
|
+
"peerDependencies": {
|
|
58
58
|
"sharp": "^0.34.5"
|
|
59
59
|
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"sharp": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
60
65
|
"devDependencies": {
|
|
61
66
|
"@types/node": "^24.6.0",
|
|
62
67
|
"esbuild": "^0.24.0",
|
|
63
68
|
"playwright": "^1.58.2",
|
|
69
|
+
"sharp": "^0.34.5",
|
|
64
70
|
"typescript": "^5.9.3"
|
|
65
71
|
},
|
|
66
72
|
"scripts": {
|
|
@@ -78,6 +84,8 @@
|
|
|
78
84
|
"probe:real-page:compare": "node scripts/real-page-pixel-compare.js",
|
|
79
85
|
"benchmark:samples": "node scripts/sample-benchmark.js",
|
|
80
86
|
"benchmark:userscript": "node scripts/userscript-benchmark.js",
|
|
87
|
+
"scan:sample-watermarks": "node scripts/scan-sample-watermarks.js",
|
|
88
|
+
"render:skipped-crops": "node scripts/render-skipped-candidate-crops.js",
|
|
81
89
|
"package:extension": "node scripts/package-extension-release.js",
|
|
82
90
|
"cli:smoke": "node bin/gwr.mjs --help",
|
|
83
91
|
"serve": "pnpm dlx serve dist",
|