Reverse Alpha Blending — The Math Behind Clean Watermark Removal

Instead of using machine learning to guess what's underneath, we reverse-engineer the exact blending formula Gemini uses to embed its watermark. The result is deterministic, fast, and runs entirely in your browser.

How It Works

STEP 01

Gemini Embeds the Watermark

When Gemini generates an image, it composites a semi-transparent watermark logo onto the output using standard alpha blending — the same technique used in every graphics editor.

watermarked = original × (1 − α) + α × 255
STEP 02

We Recover the Alpha Map

We've extracted the exact watermark pattern and its transparency values (alpha channel). This gives us the precise blending coefficients Gemini used.

α = known alpha map
STEP 03

We Reverse the Formula

With the alpha map known, we solve the blending equation for the original pixel values. No guessing, no inpainting — just algebra.

original = (watermarked − α × 255) / (1 − α)

Why This Approach Works Better

Reverse Alpha Blending
Deterministic — same input always produces identical output
Processing in milliseconds, not seconds
Runs in your browser, no GPU or cloud server needed
No model to download — just a few KB of alpha map data
Mathematically exact reversal, not approximate inpainting
ML-Based Inpainting
Probabilistic — results vary between runs and models
Takes seconds to minutes per image
Requires GPU hardware or paid cloud inference
50–200 MB model weights to download
Approximate fill — can hallucinate or blur details

Built-In Technical Advantages

Adaptive Detection

Template matching with normalized cross-correlation (NCC) scoring automatically locates the watermark position — no manual selection required.

Multi-Pass Refinement

Iterative removal with safety clamping preserves edge quality and prevents artifacts from accumulating across passes.

Sub-Pixel Precision

Works with fractional alpha values and handles anti-aliased edges, producing clean results even on detailed textures.

Size Catalog

Pre-mapped ~60 known Gemini image sizes for instant watermark configuration — no runtime calibration needed.

Open and Transparent

Our algorithm is not a black box. The reverse alpha blending formula is auditable and deterministic — you can verify exactly how each pixel is restored. All processing happens locally in your browser; your images never leave your device.