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
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 − α) + α × 255We 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 mapWe 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
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.