The BBC reports that the image Boris Johson posted on Twitter to congratulate Joe Biden contains traces of the text "Trump" in the background. The BBC article links to a Guido Fawkes' article, and when I download the tweet's JPEG, convert to PNG with macOS preview then subtract a constant background, there it is!

When I do a similar check on the blanked out area in my image in this post I see nothing, i.e. it worked.

My goal there was to show an image of a battery but to ensure that no personal information like the battery's serial number would be visible or detectable. Sharing that on the internet might be a small but nonzero security issue.

I breathe a sigh of relief but then wonder for future reference, in order to be sure that blanked out areas are fully blanked out:

Question: What aspects of image preparation workflows can lead to accidents like Boris Johnson's No. 10 tweet's 'hidden message'? What are the most prominent things to avoid doing in order to avoid accidental hidden residues like this?

Part of tweet with colors changed to make the text "Trump" visible.

import numpy as np
import matplotlib.pyplot as plt

# https://twitter.com/BorisJohnson/status/1325133262075940864/photo/1
# https://order-order.com/2020/11/10/number-10s-message-to-biden-originally-congratulated-trump/
# https://pbs.twimg.com/media/EmPRWjyVoAEBIBI?format=jpg
# https://pbs.twimg.com/media/EmPRWjyVoAEBIBI?format=jpg&name=4096x4096
# https://twitter.com/BorisJohnson/status/1325133262075940864

img = plt.imread('biden.png')

average = img[20:100, 20:100].mean(axis=(0, 1))

imgx = (img[..., :3] - average[:3]).clip(-0.005, 0.005) + 0.005
imgx = imgx.sum(axis=2)  # monochrome
imgx /= imgx.max()  # normalize

plt.imshow(imgx, cmap='cool')
  • 1
    @MarkMorganLloyd I can't disagree with the sentiment, but that might (as best, and with some tweaks to the wording) fit at politics.se. This fits with various other "how not to redact" and related questions – Chris H Nov 11 '20 at 15:11
  • 2
    @ChrisH that's right. I simply wondered "if they can screw up so badly, what might I not be erasing!?" – uhoh Nov 11 '20 at 15:25
  • I suggest this wasn't a "technical" issue the way you meant that. Surely, the parts of "image preparation workflow" which matter there are two-fold… First that there should be none: posting graphics as text is rarely helpful. Either way, the technicality was not getting people to pay attention, which is hardly an IT problem, except to the extent user10216038 is prolly right about left-over toner. – Robbie Goodwin Nov 12 '20 at 17:23
  • 1
    Oh, ffs. That must have really been a slow news day. – Robert Harvey Nov 13 '20 at 21:05


The most likely explanation is that the old text was removed by using a fuzzy or smooth eraser tool.


In the image below I have only increased brightness and contrast to make the "hidden message" more visible. Nothing fancy. The slight red tint is only due to the fact that the black background of the original has a very slight red tint to it.

enter image description here

As you can see there is a very clear gradient in the most visible hidden text fragment (under "shared priorities"). The other fragments also show some signs of gradients, but there are no gradient effects used in the text about Biden.


These seemingly random gradients together with the fact that the "hidden message" appears to consist of small random fragments of a much larger text makes me think that whoever made this picture removed the old text by using a fuzzy eraser tool. They manually swiped the eraser tool back and forth over the text until they didn't see the old text anymore. But the fuzzy eraser tool doesn't remove everything if you pass over quickly just once. This is by design to avoid sharp edges in an image.

In the picture below I have swiped a big fuzzy eraser back and forth a few times over the original image to show what the results may look like. Obviously, in my picture some parts are still a little too visible, but I still think it gives a good idea of what type of effects this could cause.

enter image description here


Don't use a fuzzy eraser tool to remove things you want to remove completely. In this case there's no need to use an eraser tool at all. Just fill the whole image with the background color, or maybe even better, just create a new image from scratch. The only thing they wanted to keep was the size and the background color and that should only take a few seconds to replicate in a new image.


As requested by @Tristan in a comment, I have tried to replicate the process completely. Here is a picture where I have removed the Biden/Kamala text with a fuzzy eraser tool and then placed a new text on top of it:

enter image description here

And here is the same picture but with increased brightness and contrast to highlight remnants of the old text:

enter image description here

  • 18
    this definitely seems the best fit so far. It explains why we have partial letters, a gradient on those letters, and only a few words with anything remaining. – Tristan Nov 11 '20 at 14:48
  • 1
    Nice! I wonder whether the original image with the "Trump" text was ever posted. – Dewi Morgan Nov 11 '20 at 23:04
  • 1
    Gold stuff. This also reveals that Boris Johnson is currently indeed number "1 0" as indicated in beautiful Albertus. Who is Number 1? – David Tonhofer Nov 11 '20 at 23:07
  • 18
    The Comic Sans is a nice touch in this case. (I never thought I'd write this sentence in my life.) – Federico Poloni Nov 12 '20 at 9:56
  • 4
    How was this easier for them than File > New? It boggles the mind – Bryan Boettcher Nov 13 '20 at 17:47

At first I thought this was simply a hoax as no digital image process I'm aware of could do this by accident, but I was intrigued.

Taking the orignal image and performing an equalize on it did indeed pull out the alternate fragments. It also revealed the black background to be not really black but a composite of dense subtractive primary colors.

Here's a crop of the equalized image:

Equalized and cropped

I'm pretty sure this error came about because the message was Printed on a Color Laser Printer and photographed (or scanned).

Note the Cyan, Magenta, Yellow remnants.

The "hidden message" is a result of a previous print leaving a tiny bit of toner on the drum which was picked up by the next print. This is most common in duplex capable printers.

So how do you prevent it? Don't photograph paper to produce digital content.

  • 28
    The background of the original image is a solid colour as far as I can tell, not sure where the noisy background is coming from in your image – Alan Birtles Nov 11 '20 at 11:16
  • 15
    Information leakage of this sort is terrifying. I can easily imagine national secrets having been printed on the printer instead, and therefore accidentally making to the Internet! – Ahmed Tawfik Nov 11 '20 at 11:27
  • 21
    The noise in the image you posted is most probably an artifact of your equalizing algorithm. It certainly isn't there in the original. More importantly, the "hidden message" is brighter than the background. Surely, remaining toner from the last print could only have made the print darker? – jkej Nov 11 '20 at 13:26
  • 11
    The text is easily revealable using a naive fill tool (i.e. one that only replaces the exact colour you click on). This replaces the background, but leaves behind the incorrect text, and a couple of jpg artifacts. This is not the behaviour you'd expect if @user10216038 had the right solution, and fits that suggested below much better – Tristan Nov 11 '20 at 14:01
  • 27
    Sorry, but this explanation is ridiculous. Who would print an image and then scan it to use in a tweet? Even ignoring the highly incredible process, this would inevitably produce image distortions, which are not visible in the image. – IMil Nov 11 '20 at 23:28

I expect the explanation is fairly mundane. An image was probably prepared with 3 layers:

  1. Background colour and maybe the footer text
  2. Trump text
  3. Biden text

You could then produce both messages with the same look by hiding either layer 2 or layer 3. I imagine what happened here is the person preparing the images hid layer 2 by reducing the opacity and accidentally set it to nearly 0 rather than 0. Add in a liberal sprinkling of JPEG compression artefacts and you get the result seen in the tweet.

Following this process and creating a JPEG results in an image like this:

exported image

I'm sure you could fiddle with the level of opacity (I used 1.6%) and JPEG quality and get a result where the alternative text was less visible to the naked eye but still present in the image.

Here is an example with a lower opacity value, I've also added "small text" in a smaller font partially overlapped with "Biden", the smaller text is swamped by the JPEG artefacts whilst "Trump" survives.

exported image with invisible trump

trump fully visible

You can avoid this by preparing two separate images or just by being a bit more careful when using layers in one image.

  • 12
    this would leave the entirety of the underlying message visible though. Instead we only have a few characters, some of them only partial – Tristan Nov 11 '20 at 14:03
  • 2
    @Tristan not necessarily if the text is much fainter than with my example (I deliberately chose a value which is still visible to the naked eye to illustrate the point) much of the text could disappear into the JPEG artefacts – Alan Birtles Nov 11 '20 at 14:06
  • The image is also likely to have gone through multiple generations of JPEG compression, once when the image was created and probably at least once more when the image was uploaded to twitter especially if the image was resized – Alan Birtles Nov 11 '20 at 14:26
  • 2
    This is closer but @Tristan has a good point. The even gradient on the small text below "shared priorities" ("the future of this"?) doesn't seem to fit with this approach even taking into account jpg artifacts, anti-aliasing, and recompression. Even your fainter version is readable immediately on my monitor - but presumably you could go more opaque still – Chris H Nov 11 '20 at 14:43
  • 3
    Yeah maybe I was giving too much technical credit to the people running our country, the eraser explanation seems more likely – Alan Birtles Nov 11 '20 at 14:55

While probably not the cause in this specific case, in theory it could also be a result of using a tool deliberately leaking redacted information.

In 2008 Underhanded C Contest, the participants were asked to write an image-editing tool leaking information about image parts redacted with (traditionally black) rectangles. And to do that in a stealthy, deniable way.

  • Interesting reading! Is it possible to add a sentence or two here that also directly addresses the original question as asked? Thanks! – uhoh Nov 13 '20 at 10:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.