@pictx/gemini-veo-watermark-remover 0.2.2
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/LICENSE +21 -0
- package/README.md +313 -0
- package/assets/masks/bg_48.png +0 -0
- package/assets/masks/bg_96.png +0 -0
- package/assets/masks/bg_b_36.png +0 -0
- package/assets/masks/bg_b_96.png +0 -0
- package/assets/masks/veo_legacy_68x30.png +0 -0
- package/assets/masks/veo_legacy_99x43.png +0 -0
- package/bin/pictx.mjs +4 -0
- package/dist/browser.d.ts +65 -0
- package/dist/browser.js +1211 -0
- package/dist/browser.js.map +7 -0
- package/dist/cli.js +10633 -0
- package/dist/cli.js.map +7 -0
- package/dist/gemini.d.ts +1 -0
- package/dist/gemini.js +596 -0
- package/dist/gemini.js.map +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9610 -0
- package/dist/index.js.map +7 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +853 -0
- package/dist/node.js.map +7 -0
- package/dist/pictx-extension-v0.2.1.zip +0 -0
- package/package.json +82 -0
- package/skills/gemini-veo-watermark-remover/SKILL.md +76 -0
- package/skills/gemini-veo-watermark-remover/scripts/run.mjs +36 -0
- package/src/extension/background.js +57 -0
- package/src/extension/content.js +569 -0
- package/src/extension/icons/icon128.png +0 -0
- package/src/extension/icons/icon16.png +0 -0
- package/src/extension/icons/icon48.png +0 -0
- package/src/extension/manifest.json +37 -0
- package/src/extension/popup.html +266 -0
- package/src/extension/popup.js +31 -0
- package/src/userscript/gemini-veo-watermark-remover.user.js +594 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ACs-del
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
[δΈζζζ‘£](README_zh.md)
|
|
2
|
+
|
|
3
|
+
> π₯ Tired of Gemini and Veo watermarks? Try the more powerful **GPT Image 2** at [pictx.ai](https://pictx.ai) β free for a limited time.
|
|
4
|
+
|
|
5
|
+
# Gemini & Veo Watermark Remover β Lossless AI Watermark Removal Tool
|
|
6
|
+
|
|
7
|
+
An open-source tool to **remove Gemini image watermarks and Veo video watermarks** from supported AI-generated outputs with high-fidelity, reproducible results. Built with pure JavaScript, the engine uses a mathematically exact **Reverse Alpha Blending** algorithm instead of unpredictable AI inpainting.
|
|
8
|
+
|
|
9
|
+
π **Gemini 3.5+ support** β images target the current Gemini profile by default with legacy fallback, and videos now default to the Gemini 3.5 diamond logo profile.
|
|
10
|
+
|
|
11
|
+
π **Looking for the `Online Gemini & Veo Watermark Remover (Recommended)`? Try [removegeminiwatermark.io](https://removegeminiwatermark.io)** β free, no install, works directly in your browser.
|
|
12
|
+
|
|
13
|
+
π‘ **Need to remove other image or video watermarks?** Try the general-purpose AI watermark remover: [pictx.ai/image-watermark-remover](https://pictx.ai/image-watermark-remover)
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://removegeminiwatermark.io/"><img src="https://img.shields.io/badge/π οΈ_Online_Tool-removegeminiwatermark.io-blue?style=for-the-badge" alt="Online Tool"></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/@pictx/gemini-veo-watermark-remover"><img src="https://img.shields.io/badge/π¦_npm-@pictx/gemini--veo--watermark--remover-CB3837?style=for-the-badge" alt="npm package"></a>
|
|
18
|
+
<a href="https://removegeminiwatermark.io/userscript/gemini-veo-watermark-remover.user.js"><img src="https://img.shields.io/badge/π_Userscript-Install-green?style=for-the-badge" alt="Userscript"></a>
|
|
19
|
+
<a href="https://pictx.ai/image-watermark-remover"><img src="https://img.shields.io/badge/π§Ή_General_Remover-pictx.ai-111111?style=for-the-badge" alt="General AI Watermark Remover"></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<img src="https://count.getloli.com/@gemini-veo-watermark-remover?name=gemini-veo-watermark-remover&theme=minecraft&padding=7&offset=0&align=top&scale=1&pixelated=1&darkmode=auto" width="400" alt="visitor counter">
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
- β
**Gemini + Veo** β First tool to handle both Gemini image and Veo video watermarks
|
|
29
|
+
- β
**Gemini 3.5+ + Legacy** β Current 36Γ36/96Γ96 Gemini profile with automatic legacy fallback.
|
|
30
|
+
- β
**Gemini 3.5 Video Diamond** β Video mode follows upstream VeoWatermarkRemover v0.5.0: diamond logo by default, old "Veo" text via `--legacy`.
|
|
31
|
+
- β
**100% Local Processing** β All processing happens locally. Nothing is uploaded.
|
|
32
|
+
- β
**Mathematical Precision** β Reverse Alpha Blending formula, not AI hallucination.
|
|
33
|
+
- β
**Auto-Detection** β NCC template matching identifies watermark size and position.
|
|
34
|
+
- β
**Flexible Usage** β Online tool, Chrome extension, userscript, CLI, SDK, and AI Agent Skill.
|
|
35
|
+
- β
**Cross-Platform** β Works in modern browsers and Node.js environments.
|
|
36
|
+
|
|
37
|
+
## Channel Γ Media Support
|
|
38
|
+
|
|
39
|
+
Not every distribution channel handles both Gemini **images** and Veo **videos**. Use this matrix to pick the right tool:
|
|
40
|
+
|
|
41
|
+
| Channel | Gemini images | Veo videos | Notes |
|
|
42
|
+
| --- | :---: | :---: | --- |
|
|
43
|
+
| npm `@pictx/gemini-veo-watermark-remover` | β
| β
| `.../browser`, `.../node`, `.../gemini` |
|
|
44
|
+
| CLI `pictx remove` | β
| β
| Batch folders with `--out-dir` |
|
|
45
|
+
| Agent Skill | β
| β
| Wraps the CLI |
|
|
46
|
+
| [removegeminiwatermark.io](https://removegeminiwatermark.io) | β
| β
| Upload-based WebCodecs pipeline |
|
|
47
|
+
| Chrome extension | β
| β | Gemini page images only; copy + download cleaned |
|
|
48
|
+
| Userscript | β
| β | Gemini page images only |
|
|
49
|
+
|
|
50
|
+
For Veo videos from the browser, use the online tool or `npx pictx remove video.mp4`. The extension and userscript intentionally stay image-only because they integrate with Gemini chat previews, not whole-file video decoding.
|
|
51
|
+
|
|
52
|
+
## Watermark Removal Examples
|
|
53
|
+
|
|
54
|
+
| Original Image | Watermark Removed |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
|  |  |
|
|
57
|
+
|
|
58
|
+
## What's New
|
|
59
|
+
|
|
60
|
+
The video engine has been updated to follow [VeoWatermarkRemover v0.5.0-demo](https://github.com/allenk/VeoWatermarkRemover/releases/tag/v0.5.0-demo). Gemini 3.5+ video outputs now use the Gemini diamond logo instead of the old "Veo" text overlay, so `pictx remove video.mp4` targets the diamond profile by default.
|
|
61
|
+
|
|
62
|
+
Older pre-Gemini-3.5 videos with the "Veo" text watermark must be processed with `--legacy`. There is no automatic fallback between video profiles because the shapes and positions differ, and applying the wrong profile can damage the frame.
|
|
63
|
+
|
|
64
|
+
## How to Remove Watermarks
|
|
65
|
+
|
|
66
|
+
### Online Watermark Remover (Recommended)
|
|
67
|
+
|
|
68
|
+
The fastest and easiest way β works for both Gemini images and Veo videos:
|
|
69
|
+
|
|
70
|
+
1. Open [removegeminiwatermark.io](https://removegeminiwatermark.io).
|
|
71
|
+
2. Drag and drop your Gemini image or Veo video.
|
|
72
|
+
3. The engine will automatically process and remove the watermark.
|
|
73
|
+
4. Download the cleaned file.
|
|
74
|
+
|
|
75
|
+
### Chrome Extension (Gemini images only)
|
|
76
|
+
|
|
77
|
+
Automatically removes watermarks from Gemini-generated **images** on Gemini pages (not Veo videos):
|
|
78
|
+
|
|
79
|
+
1. Install from the Chrome Web Store (coming soon), load unpacked from `src/extension/`, or use the GitHub Release zip.
|
|
80
|
+
2. Open Gemini. The extension automatically processes supported images.
|
|
81
|
+
3. Preview, copy, and download actions return cleaned images.
|
|
82
|
+
4. If the page becomes slow, disable the extension from the popup and refresh Gemini.
|
|
83
|
+
|
|
84
|
+
### Userscript (Tampermonkey / Violentmonkey β Gemini images only)
|
|
85
|
+
|
|
86
|
+
1. Install a userscript manager (e.g., Tampermonkey).
|
|
87
|
+
2. Install `gemini-veo-watermark-remover.user.js` from `src/userscript/` or [removegeminiwatermark.io/userscript/](https://removegeminiwatermark.io/userscript/gemini-veo-watermark-remover.user.js).
|
|
88
|
+
3. Navigate to Gemini conversation pages.
|
|
89
|
+
4. Images are automatically cleaned in-place; native copy/download flows return cleaned results.
|
|
90
|
+
|
|
91
|
+
For Veo videos, use the [online tool](https://removegeminiwatermark.io) or CLI instead.
|
|
92
|
+
|
|
93
|
+
### CLI
|
|
94
|
+
|
|
95
|
+
For scripting, CI, and local batch workflows:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Using npx (zero install)
|
|
99
|
+
npx @pictx/gemini-veo-watermark-remover remove image.png
|
|
100
|
+
npx @pictx/gemini-veo-watermark-remover remove video.mp4
|
|
101
|
+
npx @pictx/gemini-veo-watermark-remover remove old-veo-video.mp4 --legacy
|
|
102
|
+
|
|
103
|
+
# Or install globally (CLI command is still `pictx`)
|
|
104
|
+
npm i -g @pictx/gemini-veo-watermark-remover
|
|
105
|
+
pictx remove image.png -o clean.png
|
|
106
|
+
pictx remove video.mp4 --verbose # Gemini 3.5+ diamond logo
|
|
107
|
+
pictx remove old-veo-video.mp4 --legacy # old "Veo" text watermark
|
|
108
|
+
pictx remove image.jpg --json # machine-readable output
|
|
109
|
+
pictx remove old-gemini.png --legacy
|
|
110
|
+
pictx remove image.jpg --no-legacy
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Supported formats:
|
|
114
|
+
- **Images**: PNG, JPEG, WebP, BMP, TIFF (Gemini watermark)
|
|
115
|
+
- **Videos**: MP4, WebM, MOV, AVI, MKV (Veo watermark)
|
|
116
|
+
|
|
117
|
+
### SDK Usage
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
// Browser β remove Gemini watermark from image
|
|
121
|
+
import { removeGeminiWatermark } from '@pictx/gemini-veo-watermark-remover/browser';
|
|
122
|
+
|
|
123
|
+
const { blob, detected, confidence } = await removeGeminiWatermark(file);
|
|
124
|
+
if (detected) {
|
|
125
|
+
const url = URL.createObjectURL(blob);
|
|
126
|
+
// Use cleaned image...
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Browser β process Gemini 3.5+ diamond video
|
|
130
|
+
import { processVideoFile } from '@pictx/gemini-veo-watermark-remover/browser';
|
|
131
|
+
|
|
132
|
+
const cleanBlob = await processVideoFile(videoFile, {
|
|
133
|
+
onProgress: (current, total) => console.log(`${current}/${total} frames`),
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Browser β process legacy "Veo" text videos
|
|
137
|
+
const legacyBlob = await processVideoFile(videoFile, { videoProfile: 'legacy' });
|
|
138
|
+
|
|
139
|
+
// Node.js β file-based API
|
|
140
|
+
import { processVideoFile } from '@pictx/gemini-veo-watermark-remover/node';
|
|
141
|
+
await processVideoFile('input.mp4', 'output.mp4');
|
|
142
|
+
|
|
143
|
+
// Gemini-only lightweight import (no video deps)
|
|
144
|
+
import { processImage, createImageProcessor } from '@pictx/gemini-veo-watermark-remover/gemini';
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Can't Remove Your Watermark?
|
|
148
|
+
|
|
149
|
+
This tool targets **Gemini's visible watermark** (logo/star overlay), **Gemini 3.5+ video diamond logos**, and **legacy Veo visible text watermarks**. For other types of watermarks, try our general-purpose AI watermark remover.
|
|
150
|
+
|
|
151
|
+
## How It Works
|
|
152
|
+
|
|
153
|
+
### The Watermarking Process
|
|
154
|
+
|
|
155
|
+
Both Gemini and Veo apply watermarks using standard alpha compositing:
|
|
156
|
+
|
|
157
|
+
$$watermarked = \alpha \cdot logo + (1 - \alpha) \cdot original$$
|
|
158
|
+
|
|
159
|
+
### The Reverse Solution
|
|
160
|
+
|
|
161
|
+
We solve for the original pixel value:
|
|
162
|
+
|
|
163
|
+
$$original = \frac{watermarked - \alpha \cdot logo}{1 - \alpha}$$
|
|
164
|
+
|
|
165
|
+
By calibrating the exact Alpha map from known outputs, we reconstruct the original pixels with zero loss.
|
|
166
|
+
|
|
167
|
+
### Detection
|
|
168
|
+
|
|
169
|
+
1. **Profile catalog lookup** β matches image dimensions to predict the current Gemini 3.5+ watermark profile first, then legacy when needed.
|
|
170
|
+
2. **NCC template matching** β Normalized Cross-Correlation search in the bottom-right region.
|
|
171
|
+
3. **Restoration validation** β confirms the detected watermark is real before applying removal (disable with `--adaptive off`).
|
|
172
|
+
4. **Confidence threshold** β only applies removal when detection confidence β₯ 50%.
|
|
173
|
+
|
|
174
|
+
### Gemini 3.5+ Profile Support
|
|
175
|
+
|
|
176
|
+
Starting with Gemini 3.5, Google shifted the visible image watermark position and changed the small alpha map. The default image pipeline now tries the current profile first; if detection skips, it retries the legacy profile before reporting that no watermark was found.
|
|
177
|
+
|
|
178
|
+
| CLI usage | First attempt | Fallback | Use case |
|
|
179
|
+
| --- | --- | --- | --- |
|
|
180
|
+
| `pictx remove image.png` | Current / V2 | Legacy / V1 | Default for mixed folders |
|
|
181
|
+
| `pictx remove image.png --legacy` | Legacy / V1 | β | Pre-Gemini 3.5 outputs |
|
|
182
|
+
| `pictx remove image.png --no-legacy` | Current / V2 | β | Strict Gemini 3.5+ only |
|
|
183
|
+
| `pictx remove image.png --legacy --no-legacy` | β | β | Conflict, exits 2 |
|
|
184
|
+
|
|
185
|
+
### Gemini 3.5+ Video Profile Support
|
|
186
|
+
|
|
187
|
+
Starting with Gemini 3.5, video outputs use the Gemini diamond logo in the bottom-right corner. Following upstream VeoWatermarkRemover v0.5.0, the JS video pipeline now uses diamond mode by default and keeps the older "Veo" text profile behind `--legacy`.
|
|
188
|
+
|
|
189
|
+
| CLI usage | Video profile | Use case |
|
|
190
|
+
| --- | --- | --- |
|
|
191
|
+
| `pictx remove video.mp4` | Diamond | Gemini 3.5+ videos, currently calibrated for 1080p landscape/portrait |
|
|
192
|
+
| `pictx remove old-video.mp4 --legacy` | Legacy "Veo" text | Pre-Gemini-3.5 Veo videos |
|
|
193
|
+
| `pictx remove video.mp4 --no-legacy` | Diamond | Same as the default for videos |
|
|
194
|
+
|
|
195
|
+
Exit codes:
|
|
196
|
+
|
|
197
|
+
| Code | Meaning |
|
|
198
|
+
| --- | --- |
|
|
199
|
+
| `0` | Processed successfully, or a video/batch run completed without real errors |
|
|
200
|
+
| `1` | Single image skipped because no watermark was detected on any tried profile |
|
|
201
|
+
| `2` | Real failure, such as bad args, conflicting flags, IO, decode, or encode error |
|
|
202
|
+
|
|
203
|
+
## Supported Formats
|
|
204
|
+
|
|
205
|
+
### Gemini Image Watermarks
|
|
206
|
+
|
|
207
|
+
| Condition | Watermark Size | Right Margin | Bottom Margin |
|
|
208
|
+
| --- | --- | --- | --- |
|
|
209
|
+
| Current / V2 large (>1024px on both axes) | 96Γ96 | 192px | 192px |
|
|
210
|
+
| Current / V2 small | 36Γ36 | Aspect-aware | Aspect-aware |
|
|
211
|
+
| Legacy / V1 large (>1024px on both axes) | 96Γ96 | 64px | 64px |
|
|
212
|
+
| Legacy / V1 small | 48Γ48 | 32px | 32px |
|
|
213
|
+
|
|
214
|
+
### Gemini 3.5 Diamond Video Watermarks
|
|
215
|
+
|
|
216
|
+
| Resolution | Orientation | Watermark Size | Status |
|
|
217
|
+
| --- | --- | --- | --- |
|
|
218
|
+
| 1920Γ1080 | Landscape | 96Γ96 px | β
|
|
|
219
|
+
| 1080Γ1920 | Portrait | 96Γ96 px | β
|
|
|
220
|
+
| 1280Γ720, 4K, square, other ratios | β | β | Not calibrated yet |
|
|
221
|
+
|
|
222
|
+
### Legacy Veo Text Video Watermarks
|
|
223
|
+
|
|
224
|
+
| Resolution | Orientation | Watermark Size | Status |
|
|
225
|
+
| --- | --- | --- | --- |
|
|
226
|
+
| 1280Γ720 | Landscape | 80Γ28 px | β
|
|
|
227
|
+
| 720Γ1280 | Portrait | 80Γ28 px | β
|
|
|
228
|
+
| 1920Γ1080 | Landscape | 120Γ42 px | β
|
|
|
229
|
+
| 1080Γ1920 | Portrait | 120Γ42 px | β
|
|
|
230
|
+
|
|
231
|
+
## Project Structure
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
gemini-veo-watermark-remover/
|
|
235
|
+
βββ bin/ # CLI entrypoint (pictx)
|
|
236
|
+
βββ src/
|
|
237
|
+
β βββ core/
|
|
238
|
+
β β βββ blendModes.js # Shared reverse alpha blending algorithm
|
|
239
|
+
β β βββ veoConfig.js # Veo watermark position catalog
|
|
240
|
+
β β βββ embeddedAlphaMaps.js # Veo alpha map registry
|
|
241
|
+
β β βββ frameProcessor.js # Per-frame video processing
|
|
242
|
+
β β βββ gemini/ # Gemini image watermark module
|
|
243
|
+
β β βββ geminiConfig.js # Size/position detection
|
|
244
|
+
β β βββ geminiAlphaMaps.js # Alpha map management
|
|
245
|
+
β β βββ imageProcessor.js # Image processing pipeline
|
|
246
|
+
β β βββ index.js # Re-exports
|
|
247
|
+
β βββ video/
|
|
248
|
+
β β βββ videoDecoder.js # WebCodecs + ffmpeg.wasm decoder
|
|
249
|
+
β β βββ videoEncoder.js # mp4-muxer + ffmpeg.wasm encoder
|
|
250
|
+
β β βββ pipeline.js # Full video pipeline
|
|
251
|
+
β βββ sdk/
|
|
252
|
+
β β βββ index.js # Universal entry point
|
|
253
|
+
β β βββ browser.js # Browser API
|
|
254
|
+
β β βββ node.js # Node.js file-system API
|
|
255
|
+
β βββ cli/
|
|
256
|
+
β β βββ vwrCli.js # CLI implementation
|
|
257
|
+
β βββ extension/ # Chrome Extension (Manifest V3)
|
|
258
|
+
β βββ userscript/ # Tampermonkey userscript
|
|
259
|
+
βββ dist/ # Build output
|
|
260
|
+
βββ build.js # esbuild build script
|
|
261
|
+
βββ package.json
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Development
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# Install dependencies
|
|
268
|
+
npm install
|
|
269
|
+
|
|
270
|
+
# Build all bundles
|
|
271
|
+
node build.js
|
|
272
|
+
|
|
273
|
+
# Watch mode
|
|
274
|
+
node build.js --watch
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Limitations
|
|
278
|
+
|
|
279
|
+
- Only removes **visible** Gemini/Veo watermarks (logo overlay, text watermark)
|
|
280
|
+
- Does **not** remove invisible SynthID or steganographic watermarks
|
|
281
|
+
- Gemini 3.5 diamond video mode is limited to 1080p landscape and portrait until more samples are calibrated
|
|
282
|
+
- Browser video processing requires WebCodecs (Chrome 94+, Edge 94+)
|
|
283
|
+
|
|
284
|
+
<a id="skill"></a>
|
|
285
|
+
|
|
286
|
+
## Agent Skill
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
pnpm dlx skills add ACs-del/gemini-veo-watermark-remover --skill @pictx/gemini-veo-watermark-remover
|
|
290
|
+
node skills/gemini-veo-watermark-remover/scripts/run.mjs ./input.png ./clean.png
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Legal Disclaimer
|
|
294
|
+
|
|
295
|
+
This project is released under the MIT License. The removal of watermarks may have legal implications depending on your jurisdiction. Users are responsible for ensuring compliance with applicable laws.
|
|
296
|
+
|
|
297
|
+
## Credits
|
|
298
|
+
|
|
299
|
+
- Reverse Alpha Blending method based on [GeminiWatermarkTool](https://github.com/allenk/GeminiWatermarkTool) by Allen Kuo (MIT License)
|
|
300
|
+
- Gemini 3.5 image/video diamond profile follows [GeminiWatermarkTool v0.3.1](https://github.com/allenk/GeminiWatermarkTool/releases/tag/v0.3.1)
|
|
301
|
+
- Video profile behavior follows [VeoWatermarkRemover v0.5.0-demo](https://github.com/allenk/VeoWatermarkRemover/releases/tag/v0.5.0-demo)
|
|
302
|
+
|
|
303
|
+
## Related Links
|
|
304
|
+
|
|
305
|
+
- [Online Tool β removegeminiwatermark.io](https://removegeminiwatermark.io)
|
|
306
|
+
- [Pictx β AI image & video tools](https://pictx.ai)
|
|
307
|
+
- [GeminiWatermarkTool](https://github.com/allenk/GeminiWatermarkTool) β Original C/C++ implementation
|
|
308
|
+
- [VeoWatermarkRemover](https://github.com/allenk/VeoWatermarkRemover) β Original Veo CLI
|
|
309
|
+
- [Reverse Alpha Blending Deep Dive](https://allenkuo.medium.com/removing-gemini-ai-watermarks-a-deep-dive-into-reverse-alpha-blending-bbbd83af2a3f)
|
|
310
|
+
|
|
311
|
+
## License
|
|
312
|
+
|
|
313
|
+
MIT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/pictx.mjs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface GeminiRemovalResult {
|
|
2
|
+
blob: Blob
|
|
3
|
+
width: number
|
|
4
|
+
height: number
|
|
5
|
+
detected: boolean
|
|
6
|
+
confidence: number
|
|
7
|
+
status: string
|
|
8
|
+
profile?: string | null
|
|
9
|
+
attemptedProfiles?: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface VideoProgressCallback {
|
|
13
|
+
(current: number, total: number): void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function removeGeminiWatermark(
|
|
17
|
+
file: File | Blob,
|
|
18
|
+
options?: {
|
|
19
|
+
quality?: number
|
|
20
|
+
format?: string
|
|
21
|
+
skipDetection?: boolean
|
|
22
|
+
profile?: 'auto' | 'current' | 'legacy' | 'v1' | 'v2'
|
|
23
|
+
},
|
|
24
|
+
): Promise<GeminiRemovalResult>
|
|
25
|
+
|
|
26
|
+
export function processVideoFile(
|
|
27
|
+
file: File,
|
|
28
|
+
options?: {
|
|
29
|
+
onProgress?: VideoProgressCallback
|
|
30
|
+
videoProfile?: 'diamond' | 'legacy'
|
|
31
|
+
bitrate?: number
|
|
32
|
+
},
|
|
33
|
+
): Promise<Blob>
|
|
34
|
+
|
|
35
|
+
export function processVideo(
|
|
36
|
+
input: File | Blob,
|
|
37
|
+
options?: {
|
|
38
|
+
onProgress?: VideoProgressCallback
|
|
39
|
+
videoProfile?: 'diamond' | 'legacy'
|
|
40
|
+
bitrate?: number
|
|
41
|
+
},
|
|
42
|
+
): Promise<Blob>
|
|
43
|
+
|
|
44
|
+
export function removeWatermark(...args: unknown[]): unknown
|
|
45
|
+
export function processFrame(...args: unknown[]): unknown
|
|
46
|
+
export function createFrameProcessor(...args: unknown[]): unknown
|
|
47
|
+
export function getVeoWatermarkInfo(...args: unknown[]): unknown
|
|
48
|
+
export function detectVeoWatermarkConfig(...args: unknown[]): unknown
|
|
49
|
+
export function calculateWatermarkPosition(...args: unknown[]): unknown
|
|
50
|
+
export function normalizeVideoWatermarkProfile(...args: unknown[]): unknown
|
|
51
|
+
export function getEmbeddedAlphaMap(...args: unknown[]): unknown
|
|
52
|
+
export function registerAlphaMap(...args: unknown[]): unknown
|
|
53
|
+
export function processImage(...args: unknown[]): unknown
|
|
54
|
+
export function createImageProcessor(...args: unknown[]): unknown
|
|
55
|
+
export function getGeminiWatermarkInfo(...args: unknown[]): unknown
|
|
56
|
+
export function getGeminiAlphaMap(...args: unknown[]): unknown
|
|
57
|
+
export function registerGeminiAlphaMap(...args: unknown[]): unknown
|
|
58
|
+
|
|
59
|
+
export const GEMINI_DIAMOND_VIDEO_CATALOG: Record<string, unknown>
|
|
60
|
+
export const LEGACY_VEO_TEXT_CATALOG: Record<string, unknown>
|
|
61
|
+
export const VIDEO_WATERMARK_PROFILES: Record<string, unknown>
|
|
62
|
+
export const VEO_WATERMARK_CATALOG: Record<string, unknown>
|
|
63
|
+
export const GEMINI_WATERMARK_PROFILES: Record<string, unknown>
|
|
64
|
+
|
|
65
|
+
export const processImageFrame: typeof processFrame
|