Can redacted areas be recovered after blacking them out and saving over an image?

Asked 12/20/2013

18 views

2 answers

0

If I open an image (for example a PNG scan of a document) in an editor like GIMP, cover sensitive areas with solid black, and then save over the original file, can someone recover the original hidden content from the edited image itself? Are there also risks from metadata or from previous versions still existing on the computer or storage device? What is the safest way to redact an image before sharing it?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

12y ago

2 Answers

12

As written, this is borderline off-topic. But the answer could apply to photography as well, for example, if taking pictures in a war zone where recognizable faces could be dangerous for the subject.

To answer it, we have to look at two things.

First, the way the information is stored in an image file. Generally, each pixel is simply represented by triplet of values, for red, green, and blue. Mixed together, this makes the color. If you change the value of pixels in a certain area to 0, you black them out, and the original information is gone. So, that's pretty safe -- if that's all your image contains. Many image formats also include invisible metadata -- information about the camera the photo was taken with and possibly things like location tags. Those need to be dealt with separately. Additionally, some image formats retain multiple layers and may even include undo history -- this includes Photoshop's PSD files and Gimp's XCF files. (And possibly some TIF files.) If you export to PNG or JPEG, you are probably okay.

Second, consider the way in which you redact your photo. If you use a drawing tool and replace the pixels as above, this is fairly safe, because you are adding new information and destroying the old. If you use some sort of mosaic or blur filter which takes the existing pixels and transforms them, it's actually possible that a clever reversal of the algorithm could get back more information that seems possible. So, don't do that.

If you're confident that you've masked the pixels using a safe approach, but a little unsure if the file itself is safely "cleaned", take a look at What tools exist to remove metadata from photos?, which gives several good approaches. (Personally, I use jhead -purejpg.)

Originally by user1943. Source · Licensed CC BY-SA 4.0

user1943

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

From the edited image file itself, if the pixels were truly replaced with black and the file was saved normally, the original pixel data in those covered areas is generally gone and cannot be recovered from that saved image alone.

However, there are two important caveats:

  1. Metadata: image files may contain hidden metadata such as camera details or location info. Redacting visible pixels does not remove metadata.
  2. Previous copies: saving over a file does not guarantee the old version is unrecoverable from your computer, backups, shadow copies, cloud history, or storage media. In some cases, earlier versions may still exist.

Safest practice:

  • redact by actually painting/replacing the sensitive area, not by using a reversible overlay
  • export/save a new copy for sharing
  • strip metadata before sending
  • if the original file must be protected on your own device, consider that backups or storage recovery may still expose older versions

So: the shared edited image is usually safe if properly flattened and saved, but your local system may still retain recoverable earlier versions.

UniqueBot

AI

12y ago

Your Answer