gemini-watermark
Remove visible Gemini AI watermarks from images via reverse alpha blending. Use for cleaning Gemini-generated images, removing the star/sparkle logo watermark, batch watermark removal.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/h1bomb/gemini-watermarkGemini Watermark Remover
Remove the visible Gemini AI watermark (star/sparkle logo) from generated images using mathematically accurate reverse alpha blending.
Fully offline — pure Python, no external binary downloads, no network access.
When to Use
- Remove the Gemini watermark from AI-generated images
- Batch process a directory of Gemini-generated images
- Clean images before publishing or sharing
- Automate watermark removal in pipelines
Quick Start
Install Dependencies (one-time)
pip install Pillow numpy
# Recommended: use uv for faster, isolated installs
uv pip install Pillow numpy
Requires: Python ≥ 3.9. No Rust toolchain, no compiled binaries, no downloads.
Basic Usage
# Single image (auto-detect watermark, save as photo_cleaned.jpg)
python3 scripts/remove_watermark.py photo.jpg
# Specify output path
python3 scripts/remove_watermark.py photo.jpg -o clean_photo.jpg
# Batch process directory
python3 scripts/remove_watermark.py ./input_dir -o ./output_dir
# Force removal without detection
python3 scripts/remove_watermark.py photo.jpg -o clean.jpg --force
How It Works
Gemini adds a semi-transparent white star/sparkle logo to generated images using alpha blending:
watermarked = alpha * 255 + (1 - alpha) * original
This tool reverses the equation to recover the original pixels:
original = (watermarked - alpha * 255) / (1 - alpha)
The alpha map (watermark transparency pattern) is generated mathematically as a 4-pointed star (central Gaussian core + 4 elongated cardinal rays) at two sizes:
- 48×48 with 32 px margin — images where either dimension ≤ 1024 px
- 96×96 with 64 px margin — images where both dimensions > 1024 px
For improved accuracy you can supply your own alpha map derived from a background
capture of the Gemini watermark on a white background (--alpha-map).
Detection
Before removal, a three-stage algorithm checks whether a watermark is present:
- Spatial NCC (50% weight) — normalised cross-correlation with the alpha map
- Gradient NCC (30% weight) — edge signature matching via Sobel operators
- Variance Analysis (20% weight) — texture dampening detection
Images without detected watermarks are automatically skipped.
CLI Parameters
| Parameter | Short | Default | Description |
|---|---|---|---|
input | (required) | Input image file or directory | |
--output | -o | {name}_cleaned.{ext} | Output file or directory |
--force | -f | false | Skip detection, process unconditionally |
--threshold | -t | 0.35 | Detection confidence threshold (0.0–1.0) |
--force-small | false | Force 48×48 watermark size | |
--force-large | false | Force 96×96 watermark size | |
--alpha-map | (built-in) | Custom grayscale alpha map image | |
--verbose | -v | false | Enable detailed output |
--quiet | -q | false | Suppress all non-error output |
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-h1bomb-gemini-watermark": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
qwen3-tts-mlx
Local Qwen3-TTS speech synthesis on Apple Silicon via MLX. Use for offline narration, audiobooks, video voiceovers, and multilingual TTS.
libvips-image
High-performance image processing with libvips. Use for resizing, converting, watermarking, thumbnails, and batch image operations with low memory usage.