How the Gemini Watermark Works

👨‍💻
Abhin Krishna
3 min read

Hey everyone. When I first started building the AI Sparkle Remover, I had to take a deep dive into how Google Gemini actually stamps its images. If you are going to reverse-engineer something using pure Vanilla JavaScript, you need to understand the mechanics of what you are undoing.

Google Gemini uses a two-layered approach to watermark its AI-generated images to ensure authenticity and safety. Understanding the difference between these two layers is crucial to understanding what RemoveWatermark.dev actually does.

1. The Invisible SynthID

Before we even see the image, Google DeepMind embeds something called SynthID. This is an invisible, steganographic fingerprint woven directly into the pixels during the generation process. It alters the frequency domain of the image in a way that is entirely imperceptible to the human eye. You cannot just crop it out, compress it away, or easily remove it without severely degrading the image quality. It is a machine-level tracker designed to survive almost any edit.

2. The Visible Sparkle Logo

Then, we have the visible watermark. This is the small, white, semi-transparent sparkle logo you see sitting in the bottom-right corner of Gemini images. Unlike SynthID, this logo is applied after the neural network has finished generating the image.

Gemini uses a standard image processing technique called Alpha Compositing to stamp this logo on top of the final output.

Why apply a visible watermark at all?

The visible logo acts as an immediate, psychological visual cue to humans that the image is AI-generated. It is for the average user scrolling through social media, while SynthID handles the hardcore machine-level detection for researchers and platforms.

Here is the secret that makes this entire project possible: because the visible sparkle is applied mathematically as an overlay on top of the finished image, the original pixels beneath it still exist. They are just trapped inside a math equation. In our next article, I will explain the exact math behind Reverse Alpha Blending and how we can perfectly extract those original pixels back out.

Related Articles