Learn-skills.dev 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.
git clone https://github.com/NeverSight/learn-skills.dev
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/agiseek/agent-skills/gemini-watermark" ~/.claude/skills/neversight-learn-skills-dev-gemini-watermark && rm -rf "$T"
data/skills-md/agiseek/agent-skills/gemini-watermark/SKILL.mdGemini Watermark Remover
Remove the visible Gemini AI watermark (star/sparkle logo) from generated images using mathematically accurate reverse alpha blending. Fast, offline, single binary with zero runtime dependencies.
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
Option 1 — Recommended: Build from source (Rust toolchain required)
cargo install gemini-watermark-removal gemini-watermark --version
Building from source lets you audit the code before running it and avoids dependency on a third-party pre-built binary.
Option 2 — Pre-built binary (third-party download)
Security notice: The installer downloads a binary from the
GitHub organization, which is an independent third party. Review the source ateasynote-ccbefore proceeding. SHA256 verification is mandatory; the install will abort if the checksum file is missing.https://github.com/easynote-cc/gemini-watermark-removal
# Interactive (asks for confirmation before downloading) ./scripts/install.sh # Non-interactive (auto-confirm, e.g. in a script) ./scripts/install.sh --yes # Install a specific pinned version VERSION=v0.1.1 ./scripts/install.sh
Supported platforms: macOS (Apple Silicon / Intel), Linux (x86_64 / ARM64), Windows (x86_64, via Git Bash / MSYS2).
Basic Usage
# Single image (auto-detect watermark, save as photo_cleaned.jpg) ./scripts/gemini-watermark photo.jpg # Specify output path ./scripts/gemini-watermark photo.jpg -o clean_photo.jpg # Batch process directory ./scripts/gemini-watermark ./input_dir -o ./output_dir # Force removal without detection ./scripts/gemini-watermark 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 maps (watermark transparency patterns) are embedded in the binary at two sizes:
- 48x48 with 32px margin: for images where either dimension <= 1024px
- 96x96 with 64px margin: for images where both dimensions > 1024px
Detection
Before removal, a three-stage detection algorithm checks if a watermark is present:
- Spatial NCC (50% weight): normalized 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 to protect originals.
CLI Parameters
| Parameter | Short | Default | Description |
|---|---|---|---|
| (required) | Input image file or directory | |
| | | Output file or directory |
| | | Skip detection, process unconditionally |
| | | Detection confidence threshold (0.0-1.0) |
| | Force 48x48 watermark size | |
| | Force 96x96 watermark size | |
| | | Enable detailed output |
| | | Suppress all non-error output |
Supported Formats
| Format | Read | Write |
|---|---|---|
| JPEG (.jpg, .jpeg) | Yes | Yes (quality 100) |
| PNG (.png) | Yes | Yes |
| WebP (.webp) | Yes | Yes |
| BMP (.bmp) | Yes | Yes |
Usage Examples
# Remove watermark with verbose output ./scripts/gemini-watermark photo.png -o clean.png -v # Lower detection threshold (more sensitive) ./scripts/gemini-watermark photo.jpg -t 0.15 # Force large watermark size regardless of image dimensions ./scripts/gemini-watermark photo.jpg --force-large -o clean.jpg # Batch process, quiet mode ./scripts/gemini-watermark ./gemini_images/ -o ./cleaned/ -q # Force removal on all images in batch (no detection) ./scripts/gemini-watermark ./images/ -o ./output/ --force
Output
- Single file: Saves to specified
path, or-o
by default{name}_cleaned.{ext} - Directory: Saves all processed images to the output directory with original filenames
- Skipped images: Images without detected watermarks are not processed (unless
)--force - Exit code: 0 on success, 1 if any image fails
Troubleshooting
Download failed or checksum missing during install
If the SHA256 checksum file is absent for a release, the installer will abort to protect you from an unverified binary. Build from source instead:
cargo install gemini-watermark-removal
Unsupported platform
cargo install works on any platform with a Rust toolchain. The pre-built binary
installer covers macOS, Linux, and Windows (Git Bash / MSYS2) only.
"No watermark detected" on a watermarked image
- Try lowering the threshold:
-t 0.1 - Or use
to skip detection--force
Image looks distorted after removal
- The image may not have a Gemini watermark. Use detection (don't use
)--force - Try
or--force-small
to match the correct watermark size--force-large
"Image too small" warning
The image dimensions are smaller than the watermark region. This typically means the image does not have a Gemini watermark.
Limitations
- Visible watermark only: This tool removes the visible star/sparkle logo watermark
- Cannot remove SynthID: Google's invisible watermark (SynthID) is embedded at the pixel level during generation and cannot be reversed
- Fixed positions only: Only handles watermarks in the standard bottom-right position