// blog

How to Remove a Date Stamp From a Photo, and How the Fill Works

To remove a date stamp from a photo, open it in the AI Web Center image editor, go to Remove, paint over the digits including their glow, and press Remove painted area. The painted area is filled with small patches copied from the surrounding photo, chosen with the PatchMatch algorithm from coarse to fine, and blended at the edges so the fill matches. It runs in your browser and works best on textures such as water, sky, grass and walls.

Last updated 3 min read

Film cameras from the 80s and 90s, and plenty of early digital ones, burned the date into the corner of every picture: orange digits like 10 30 '26. Scanned family photos are full of them. So are photos from cheap cameras with the setting left on.

Remove it in three steps

  1. Open the photo in the image editor and click Remove. (No photo at hand? Pick the sample Photo with a date stamp.)
  2. Paint over the digits with the brush. Go a little past the edges: date stamps glow, and the glow needs to go too. Zoom in with 2× or 4× for small ones.
  3. Press Remove painted area.

A second later the digits are gone and the water, sky or grass carries on where they were. Not right? Undo, paint a slightly bigger area, and try again.

The same works for dust spots on a scan, a power line across the sky, a small logo you added yourself years ago, or a stranger in the far background.

How the fill works

Blurring the hole from its edges would leave a smooth smudge. The trick is to copy texture instead: fill the hole with small patches, 7 by 7 pixels, taken from elsewhere in the photo, chosen so that they agree with what’s around the hole and with each other. That’s image completion as described by Wexler, Shechtman and Irani, and it runs in three parts.

1. Coarse to fine. The photo is halved in size a few times, until the hole is only a few pixels thick. There, the rough colors and shapes are worked out. Each finer level starts from the coarser one’s answer and adds detail. The number of levels depends on how thick the painted area is, not how wide: a date stamp is wide but its strokes are thin, and halving it too often would merge the digits into one big blob.

2. Finding patches fast: PatchMatch. For every patch that touches the hole, we need the most similar patch from the rest of the photo. Checking them all would take minutes. PatchMatch (Barnes and colleagues, 2009) relies on two facts: neighbors usually match neighbors, so a good match for one patch suggests one for the patch next to it; and random guesses, tried in shrinking circles around the best match so far, find better ones quickly. A few passes of that, and every patch has a good match.

3. Voting, then blending. Each pixel in the hole is covered by many patches, and each says what color it should be. Early on the editor averages those votes. On the last pass of each level it takes the single best patch’s word instead, because averages of slightly different textures turn into flat mush. Finally, copied patches can be a shade lighter or darker than the edge they land next to. The editor measures that mismatch along the edge and spreads a smooth correction across the hole, the way Poisson image editing blends one picture into another. The seam disappears and the copied texture stays.

All of this runs in a Web Worker, so the page stays responsive. On a 12-megapixel photo, a date stamp takes well under a second.

What it doesn’t do

It doesn’t understand the picture. It copies what’s there. If you paint over half a face or the corner of a window, it can only fill with something that looks like nearby texture, not the face or the window. For that you’d want a generative AI model, and that means uploading the photo to whoever runs it.

Key takeaways

  • Paint over the date stamp, glow included, and press Remove.
  • The fill copies real texture from the photo, coarse to fine, with PatchMatch.
  • The edges are blended so the fill matches its surroundings.
  • It’s for your own photos: date stamps, spots, wires, your own old marks.

Remove a date stamp →

Need image processing that runs in your users’ browsers, without a server bill per photo? We’ll build it for you, and because we work with AI-assisted development, it costs far less than you might expect. Let’s talk.

Frequently asked questions

What can the Remove tool remove well?

Thin or small things on a textured background: date stamps, dust spots, wires, a pimple, small text, your own old watermark, a stray person far away on a beach. It struggles with large objects in front of detailed, structured backgrounds, such as a person standing in front of a building's windows, where the fill has to invent geometry.

Can I remove a watermark from a stock photo?

No. Use Remove only on photos you own or have permission to edit. A stock watermark marks someone else's copyright, and removing it to use the photo is infringement; in the United States, removing copyright information to hide infringement is also prohibited by 17 U.S.C. § 1202. License the photo instead and you get a clean, full-size file.

Why does it run in a background worker?

Filling a large area takes from a fraction of a second to several seconds. In a Web Worker it runs beside the page, so the page stays responsive and can show progress.

Sources

  1. PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing (Barnes et al., SIGGRAPH 2009)
  2. Space-Time Completion of Video (Wexler, Shechtman and Irani, IEEE TPAMI, 2007)
  3. Poisson Image Editing (Pérez, Gangnet and Blake, SIGGRAPH 2003)