Remove a date stamp from a scanned photo: crop first, then a mask edit
Remove an orange date stamp from a scanned family photo: crop it for free in Pillow, or mask it and edit with openai/gpt-image-2.5 from $0.0094 an image.

To remove a date stamp from a scanned photo, try the free option first: if the stamp sits in a corner on a margin, crop it off in Pillow. If it sits over the picture, mask the stamp and send one edit to openai/gpt-image-2.5 with mask_url, which Sume bills at $0.009375 on low and $0.0835 on high for a 1024x1024 edit with one input image. Do this only for photos you own or have the right to alter.
Date stamps are small, high-contrast, usually orange or white digits near a corner, which makes them a good fit for a masked edit. The part to get right is the mask and the check afterwards.
Option 1: crop it away
Many scanned prints have the stamp in the bottom right with a few millimetres of picture around it. Cropping 5 to 6 percent from the bottom removes it with no model at all, and the remaining pixels are untouched. Crop first, look at the framing, and only go to an edit if the loss of composition is unacceptable.
from PIL import Image
im = Image.open("scan.jpg")
w, h = im.size
im.crop((0, 0, w, int(h * 0.94))).save("scan_cropped.jpg", quality=95)
print("cropped", w, h, "->", w, int(h * 0.94))Option 2: mask the stamp and edit
Make a mask the same size as the scan that covers the digits plus a small margin, upload it where Sume can fetch it over public HTTPS, and send the scan as the only input reference. The Sume docs describe mask_url as available on ChatGPT Image 2.5 edits and do not publish the polarity, so test it with one low edit before you run the batch.
In the prompt, say what should fill the area: continue the grass texture, the wall, the sky. A vague prompt invites the model to invent a feature. Keep aspect_ratio on auto so the output matches the scan frame. Scans are often larger than 1024 pixels, and the model may return a different pixel size, so check the output dimensions before you replace an archive file.
What the edit costs
Fixture amounts are for one 1024x1024 image with one input reference. A larger scan changes input tokens, so expect the real figure to be somewhat higher.
| Quality | Per edit | 250 scans |
|---|---|---|
| low | $0.009375 | $2.34 |
| medium | $0.021 | $5.25 |
| high | $0.0835 | $20.88 |
Mask-building tips for stamps
Stamps are usually a fixed font in a fixed place, so one mask often works for a whole roll of scans from the same lab or camera. Measure the box once, add a margin of about the height of a digit, and generate the mask in code for every scan size. A mask that is too tight leaves orange fringe pixels around each digit, and those are what the eye finds first.
Scans from the same roll can differ in size, rotation and crop, because flatbed scanners and lab scans rarely align the same way twice, so do not reuse a mask blindly. Open the first three scans, confirm the stamp position, and keep the coordinates as ratios of width and height rather than pixels. Then run the whole roll at low and review thumbnails in a contact sheet before spending on medium or high for the ones that need it.
Check the neighbourhood
Diff the result against the scan. The stamp area should change and the rest should not. Old prints carry grain, dust and colour casts that a model may smooth away outside the mask; if the whole image looks cleaner, you have changed more than the stamp. For an archive, keep the original scan and store the edited file next to it, with the model and date in the filename.
If the stamp covers a face or fine detail, do not edit it. A hallucinated face on a family photo is worse than a visible date, and so is a smoothed-over background that no longer matches the memory. When in doubt, keep the date.
Sources
Related posts
More in Use cases
- Remove dust, lint and wrinkles from a product photo with an AI edit
Clean dust, lint and fabric wrinkles from a product photo with ideogram/ideogram-v4.5: one reference, no mask, $0.0375 to $0.275 per image on Sume.
- Remove the photographer's reflection from a window photo: masked edit
Remove your own reflection from a shop window photo: mask it and send a gpt-image-2.5 edit with mask_url, $0.0094 to $0.0835 per image on Sume. Checks inside.
- Replace a dull sky in a property photo: mask only the sky
Swap a grey sky for blue in a property photo: build a sky mask in Pillow and send a mask_url edit to gpt-image-2.5. $0.021 at medium, $2.10 for 100 photos.
- Replace an old logo on 40 product photos with Ideogram 4.5
Rebrand 40 product photos: send each photo plus the new logo as a second reference to ideogram/ideogram-v4.5. Cost on Sume: $1.50 at low, $3 at medium.
Written by Sume