@pilio/gemini-watermark-remover 1.0.27 → 1.0.28
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 +91 -91
- package/README_zh.md +414 -414
- package/package.json +10 -1
- package/skills/gemini-watermark-remover/SKILL.md +32 -32
- package/skills/gemini-watermark-remover/references/usage.md +23 -23
- package/src/core/candidateEvaluation.js +182 -0
- package/src/core/candidateSelector.js +40 -22
- package/src/core/imageWatermarkPipeline.js +127 -0
- package/src/core/imageWatermarkPipelineRequest.js +39 -0
- package/src/core/pipelineAcceptedExecutor.js +299 -0
- package/src/core/pipelineAcceptedExecutorRequest.js +44 -0
- package/src/core/pipelineAcceptedFinalizationRequest.js +21 -0
- package/src/core/pipelineAlphaStageSpecs.js +573 -0
- package/src/core/pipelineAlphaTraceContract.js +56 -0
- package/src/core/pipelineAlphaTrial.js +223 -0
- package/src/core/pipelineDecisionPath.js +161 -0
- package/src/core/pipelineDetectionCandidate.js +128 -0
- package/src/core/pipelineFinalization.js +46 -0
- package/src/core/pipelineInitialContext.js +52 -0
- package/src/core/pipelineInitialSelection.js +61 -0
- package/src/core/pipelineLayerContracts.js +163 -0
- package/src/core/pipelineMeta.js +201 -0
- package/src/core/pipelineMetrics.js +88 -0
- package/src/core/pipelinePassState.js +36 -0
- package/src/core/pipelineRepairGates.js +124 -0
- package/src/core/pipelineRepairStageSpecs.js +491 -0
- package/src/core/pipelineRepairTrial.js +156 -0
- package/src/core/pipelineResult.js +128 -0
- package/src/core/pipelineRuntime.js +689 -0
- package/src/core/pipelineRuntimeBootstrap.js +78 -0
- package/src/core/pipelineState.js +134 -0
- package/src/core/pipelineTimings.js +36 -0
- package/src/core/pipelineTrace.js +28 -0
- package/src/core/watermarkProcessor.js +971 -1284
package/README.md
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
[中文文档](README_zh.md)
|
|
2
|
-
|
|
3
|
-
> 🔥 Tired of Gemini watermarks? Try the more powerful **GPT Image 2** at [pilio.ai](https://pilio.ai) — free for a limited time.
|
|
4
|
-
|
|
5
|
-
# Gemini Watermark Remover — Lossless Watermark Removal Tool
|
|
6
|
-
|
|
7
|
-
An open-source tool to **remove Gemini watermarks** from AI-generated images with high-fidelity, reproducible results on supported outputs. Built with pure JavaScript, the engine uses a mathematically exact **Reverse Alpha Blending** algorithm instead of unpredictable AI inpainting.
|
|
8
|
-
|
|
9
|
-
> **🚀 Looking for the `Online Gemini Watermark Remover (Recommended)`? Try [geminiwatermarkremover.io](https://geminiwatermarkremover.io/)** — free, no install, works directly in your browser.
|
|
10
|
-
>
|
|
11
|
-
> 💡 Got watermarks that Gemini Watermark Remover can't handle? Try the general-purpose AI watermark remover: [pilio.ai/image-watermark-remover](https://pilio.ai/image-watermark-remover)
|
|
12
|
-
|
|
13
|
-
<p align="center">
|
|
14
|
-
<a href="https://geminiwatermarkremover.io/"><img src="https://img.shields.io/badge/🛠️_Online_Tool-geminiwatermarkremover.io-blue?style=for-the-badge" alt="Online Tool"></a>
|
|
15
|
-
<a href="https://geminiwatermarkremover.io/video"><img src="https://img.shields.io/badge/🎬_Video_Remover-New!-ff6b6b?style=for-the-badge" alt="Video Watermark Remover"></a>
|
|
16
|
-
<a href="https://chromewebstore.google.com/detail/gemini-watermark-remover/cjlmnfcfnofnglkphbcdclbpimdjkmdf"><img src="https://img.shields.io/badge/🧩_Chrome_Extension-Install-blueviolet?style=for-the-badge" alt="Chrome Extension"></a>
|
|
17
|
-
<a href="https://geminiwatermarkremover.io/userscript/gemini-watermark-remover.user.js"><img src="https://img.shields.io/badge/🐒_Userscript-Install-green?style=for-the-badge" alt="Userscript"></a>
|
|
18
|
-
<a href="https://pilio.ai/image-watermark-remover"><img src="https://img.shields.io/badge/🧹_General_Remover-pilio.ai-gray?style=for-the-badge" alt="General Watermark Remover"></a>
|
|
19
|
-
</p>
|
|
20
|
-
|
|
21
|
-
<p align="center">
|
|
22
|
-
<img src="https://count.getloli.com/@gemini-watermark-remover?name=gemini-watermark-remover&theme=minecraft&padding=7&offset=0&align=top&scale=1&pixelated=1&darkmode=auto" width="400">
|
|
23
|
-
</p>
|
|
24
|
-
|
|
25
|
-
## Features
|
|
26
|
-
|
|
27
|
-
- ✅ **100% Local Processing** - All image processing happens locally in your browser or on your machine. Nothing is uploaded.
|
|
28
|
-
- ✅ **Mathematical Precision** - Based on the Reverse Alpha Blending formula, not "hallucinating" AI models.
|
|
29
|
-
- ✅ **Auto-Detection** - Automatically identifies watermark size and position using Gemini's known output catalog and local anchor search.
|
|
30
|
-
- ✅ **Flexible Usage** - Online tool for quick use, Chrome extension or userscript for seamless Gemini page integration, CLI and Skill for scripting and automation.
|
|
31
|
-
- ✅ **Video Support** - Remove watermarks from Gemini-generated videos at [geminiwatermarkremover.io/video](https://geminiwatermarkremover.io/video).
|
|
1
|
+
[中文文档](README_zh.md)
|
|
2
|
+
|
|
3
|
+
> 🔥 Tired of Gemini watermarks? Try the more powerful **GPT Image 2** at [pilio.ai](https://pilio.ai) — free for a limited time.
|
|
4
|
+
|
|
5
|
+
# Gemini Watermark Remover — Lossless Watermark Removal Tool
|
|
6
|
+
|
|
7
|
+
An open-source tool to **remove Gemini watermarks** from AI-generated images with high-fidelity, reproducible results on supported outputs. Built with pure JavaScript, the engine uses a mathematically exact **Reverse Alpha Blending** algorithm instead of unpredictable AI inpainting.
|
|
8
|
+
|
|
9
|
+
> **🚀 Looking for the `Online Gemini Watermark Remover (Recommended)`? Try [geminiwatermarkremover.io](https://geminiwatermarkremover.io/)** — free, no install, works directly in your browser.
|
|
10
|
+
>
|
|
11
|
+
> 💡 Got watermarks that Gemini Watermark Remover can't handle? Try the general-purpose AI watermark remover: [pilio.ai/image-watermark-remover](https://pilio.ai/image-watermark-remover)
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://geminiwatermarkremover.io/"><img src="https://img.shields.io/badge/🛠️_Online_Tool-geminiwatermarkremover.io-blue?style=for-the-badge" alt="Online Tool"></a>
|
|
15
|
+
<a href="https://geminiwatermarkremover.io/video"><img src="https://img.shields.io/badge/🎬_Video_Remover-New!-ff6b6b?style=for-the-badge" alt="Video Watermark Remover"></a>
|
|
16
|
+
<a href="https://chromewebstore.google.com/detail/gemini-watermark-remover/cjlmnfcfnofnglkphbcdclbpimdjkmdf"><img src="https://img.shields.io/badge/🧩_Chrome_Extension-Install-blueviolet?style=for-the-badge" alt="Chrome Extension"></a>
|
|
17
|
+
<a href="https://geminiwatermarkremover.io/userscript/gemini-watermark-remover.user.js"><img src="https://img.shields.io/badge/🐒_Userscript-Install-green?style=for-the-badge" alt="Userscript"></a>
|
|
18
|
+
<a href="https://pilio.ai/image-watermark-remover"><img src="https://img.shields.io/badge/🧹_General_Remover-pilio.ai-gray?style=for-the-badge" alt="General Watermark Remover"></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="https://count.getloli.com/@gemini-watermark-remover?name=gemini-watermark-remover&theme=minecraft&padding=7&offset=0&align=top&scale=1&pixelated=1&darkmode=auto" width="400">
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
- ✅ **100% Local Processing** - All image processing happens locally in your browser or on your machine. Nothing is uploaded.
|
|
28
|
+
- ✅ **Mathematical Precision** - Based on the Reverse Alpha Blending formula, not "hallucinating" AI models.
|
|
29
|
+
- ✅ **Auto-Detection** - Automatically identifies watermark size and position using Gemini's known output catalog and local anchor search.
|
|
30
|
+
- ✅ **Flexible Usage** - Online tool for quick use, Chrome extension or userscript for seamless Gemini page integration, CLI and Skill for scripting and automation.
|
|
31
|
+
- ✅ **Video Support** - Remove watermarks from Gemini-generated videos at [geminiwatermarkremover.io/video](https://geminiwatermarkremover.io/video).
|
|
32
32
|
- ✅ **Cross-Platform** - Works in modern browsers (Chrome, Firefox, Safari, Edge) and Node.js environments.
|
|
33
33
|
|
|
34
|
-
## Gemini Watermark Removal Examples
|
|
35
|
-
|
|
36
|
-
<details open>
|
|
37
|
-
<summary>Click to Expand/Collapse Examples</summary>
|
|
38
|
-
|
|
39
|
-
| Original Image | Watermark Removed |
|
|
40
|
-
| :---: | :----: |
|
|
41
|
-
| <img src="docs/demo-before.webp" width="400"> | <img src="docs/demo-after.webp" width="400"> |
|
|
42
|
-
|
|
43
|
-
</details>
|
|
34
|
+
## Gemini Watermark Removal Examples
|
|
35
|
+
|
|
36
|
+
<details open>
|
|
37
|
+
<summary>Click to Expand/Collapse Examples</summary>
|
|
38
|
+
|
|
39
|
+
| Original Image | Watermark Removed |
|
|
40
|
+
| :---: | :----: |
|
|
41
|
+
| <img src="docs/demo-before.webp" width="400"> | <img src="docs/demo-after.webp" width="400"> |
|
|
42
|
+
|
|
43
|
+
</details>
|
|
44
44
|
|
|
45
45
|
## ⚠️ Disclaimer
|
|
46
46
|
|
|
@@ -64,36 +64,36 @@ An open-source tool to **remove Gemini watermarks** from AI-generated images wit
|
|
|
64
64
|
For all users — the fastest and easiest way to remove Gemini watermarks from images:
|
|
65
65
|
|
|
66
66
|
1. Open **[geminiwatermarkremover.io](https://geminiwatermarkremover.io/)**.
|
|
67
|
-
2. Drag and drop or click to select your Gemini-generated image.
|
|
68
|
-
3. The engine will automatically process and remove the watermark.
|
|
69
|
-
4. Download the cleaned image.
|
|
70
|
-
|
|
71
|
-
### Online Video Watermark Remover (New!)
|
|
72
|
-
|
|
73
|
-
For Gemini-generated **videos** with visible watermarks:
|
|
74
|
-
|
|
75
|
-
1. Open **[geminiwatermarkremover.io/video](https://geminiwatermarkremover.io/video)**.
|
|
76
|
-
2. Upload or drag-and-drop your Gemini-generated video.
|
|
77
|
-
3. The tool will automatically detect and remove the watermark from the video.
|
|
78
|
-
4. Download the cleaned video.
|
|
79
|
-
|
|
80
|
-
> **Note**: Video watermark removal runs entirely in your browser — no files are uploaded to any server.
|
|
81
|
-
|
|
82
|
-
### Chrome Extension
|
|
83
|
-
|
|
84
|
-
Use this if you do not want a userscript manager but still want automatic Gemini page integration for previews, copy, and download actions.
|
|
85
|
-
|
|
86
|
-
1. Open [Gemini Watermark Remover on the Chrome Web Store](https://chromewebstore.google.com/detail/gemini-watermark-remover/cjlmnfcfnofnglkphbcdclbpimdjkmdf).
|
|
87
|
-
2. Click **Add to Chrome** and confirm the install.
|
|
88
|
-
3. Open Gemini. The extension will automatically process supported Gemini images.
|
|
89
|
-
|
|
90
|
-
The popup includes an "Enable on Gemini" toggle. If Gemini becomes slow, behaves unexpectedly, or you need to troubleshoot the page, turn the toggle off and refresh Gemini.
|
|
91
|
-
|
|
92
|
-
Chrome Web Store installs update automatically. If the Web Store is not reachable in your network, the matching verified zip (`gemini-watermark-remover-extension-v*.zip`) remains available from [GitHub Releases](https://github.com/GargantuaX/gemini-watermark-remover/releases/latest) and the official website download entry for manual unpacked installation.
|
|
93
|
-
|
|
94
|
-
### Userscript
|
|
95
|
-
|
|
96
|
-
1. Install a userscript manager (e.g., Tampermonkey or Greasemonkey).
|
|
67
|
+
2. Drag and drop or click to select your Gemini-generated image.
|
|
68
|
+
3. The engine will automatically process and remove the watermark.
|
|
69
|
+
4. Download the cleaned image.
|
|
70
|
+
|
|
71
|
+
### Online Video Watermark Remover (New!)
|
|
72
|
+
|
|
73
|
+
For Gemini-generated **videos** with visible watermarks:
|
|
74
|
+
|
|
75
|
+
1. Open **[geminiwatermarkremover.io/video](https://geminiwatermarkremover.io/video)**.
|
|
76
|
+
2. Upload or drag-and-drop your Gemini-generated video.
|
|
77
|
+
3. The tool will automatically detect and remove the watermark from the video.
|
|
78
|
+
4. Download the cleaned video.
|
|
79
|
+
|
|
80
|
+
> **Note**: Video watermark removal runs entirely in your browser — no files are uploaded to any server.
|
|
81
|
+
|
|
82
|
+
### Chrome Extension
|
|
83
|
+
|
|
84
|
+
Use this if you do not want a userscript manager but still want automatic Gemini page integration for previews, copy, and download actions.
|
|
85
|
+
|
|
86
|
+
1. Open [Gemini Watermark Remover on the Chrome Web Store](https://chromewebstore.google.com/detail/gemini-watermark-remover/cjlmnfcfnofnglkphbcdclbpimdjkmdf).
|
|
87
|
+
2. Click **Add to Chrome** and confirm the install.
|
|
88
|
+
3. Open Gemini. The extension will automatically process supported Gemini images.
|
|
89
|
+
|
|
90
|
+
The popup includes an "Enable on Gemini" toggle. If Gemini becomes slow, behaves unexpectedly, or you need to troubleshoot the page, turn the toggle off and refresh Gemini.
|
|
91
|
+
|
|
92
|
+
Chrome Web Store installs update automatically. If the Web Store is not reachable in your network, the matching verified zip (`gemini-watermark-remover-extension-v*.zip`) remains available from [GitHub Releases](https://github.com/GargantuaX/gemini-watermark-remover/releases/latest) and the official website download entry for manual unpacked installation.
|
|
93
|
+
|
|
94
|
+
### Userscript
|
|
95
|
+
|
|
96
|
+
1. Install a userscript manager (e.g., Tampermonkey or Greasemonkey).
|
|
97
97
|
2. Open [gemini-watermark-remover.user.js](https://geminiwatermarkremover.io/userscript/gemini-watermark-remover.user.js).
|
|
98
98
|
3. The script will install automatically.
|
|
99
99
|
4. Navigate to Gemini conversation pages.
|
|
@@ -140,17 +140,17 @@ node bin/gwr.mjs remove <input> --output <file>
|
|
|
140
140
|
gwr remove <input> [--output <file> | --out-dir <dir>] [--overwrite] [--json]
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
If you do not have `gwr` installed globally, use:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
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:
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
pnpm add sharp
|
|
153
|
-
```
|
|
143
|
+
If you do not have `gwr` installed globally, use:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
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:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pnpm add sharp
|
|
153
|
+
```
|
|
154
154
|
|
|
155
155
|
### Can't Remove Your Watermark?
|
|
156
156
|
|
|
@@ -228,9 +228,9 @@ import {
|
|
|
228
228
|
Use the pure-data API when you already have decoded `ImageData`:
|
|
229
229
|
|
|
230
230
|
```javascript
|
|
231
|
-
const result = await removeWatermarkFromImageData(imageData, {
|
|
232
|
-
adaptiveMode: 'auto',
|
|
233
|
-
});
|
|
231
|
+
const result = await removeWatermarkFromImageData(imageData, {
|
|
232
|
+
adaptiveMode: 'auto',
|
|
233
|
+
});
|
|
234
234
|
|
|
235
235
|
console.log(result.meta.decisionTier);
|
|
236
236
|
```
|
|
@@ -274,12 +274,12 @@ const result = await removeWatermarkFromBuffer(inputBuffer, {
|
|
|
274
274
|
- TypedArray (`Float32Array`, `Uint8ClampedArray`)
|
|
275
275
|
- for the website copy button: `navigator.clipboard.write(...)` and `ClipboardItem`
|
|
276
276
|
|
|
277
|
-
### CLI And Skill
|
|
278
|
-
|
|
279
|
-
- a local Node.js runtime capable of running this package
|
|
280
|
-
- `sharp` installed when using the default CLI file decoder/encoder
|
|
281
|
-
- filesystem access for local input/output paths
|
|
282
|
-
- for repo-local usage:
|
|
277
|
+
### CLI And Skill
|
|
278
|
+
|
|
279
|
+
- a local Node.js runtime capable of running this package
|
|
280
|
+
- `sharp` installed when using the default CLI file decoder/encoder
|
|
281
|
+
- filesystem access for local input/output paths
|
|
282
|
+
- for repo-local usage:
|
|
283
283
|
|
|
284
284
|
```bash
|
|
285
285
|
node bin/gwr.mjs remove <input> --output <file>
|