6

The Preview application has a Markup toolbar, which allows drawing over the top of an image. I was thinking about the possibility of using this feature to draw opaque shapes to redact sensitive portions of an image. My specific case is hiding names from a PNG screenshot.

This is on a version of macOS prior to Big Sur, so the "Redact Selection" option is not available in the app.

My intuition is that, as a raster-graphics image format, the resulting PNG wouldn't contain the redacted text even as non-visible image data. This differs from something like a PDF, where the data is still present in a layer behind the redaction, and therefore recoverable by examining the file data.

Can Preview be used in this manner to irrevocably remove sensitive information from a PNG image?

2 Answers 2

5

enter image description here
Single layer png file

Yes, so long as you're saving in .png or .jpg - something that won't save layers.
Technically, png can use layers, but Preview doesn't.
Once it's flattened to a single layer, the information underneath no longer exists.
Note that due to an editing peculiarity of Preview, your redacting object remains movable even after the image is saved - but the saved version is already now a single layer. If you close & re-open you'll see the editable layer was only present 'live' in Preview for the time the original was open.

This will not work reliably on a pdf. The element used to redact will still be a movable object, if not in Preview, then in some 3rd party app. Different pdf viewers respect different security levels & you can always find one somewhere that will bypass any security you try to implement.

enter image description here
png screenshot of multi-layered PDF original.

1

Your reasoning is correct: in PDFs, you cannot redact like this, the text is still present. But with pure pixel formats like PNG, JPEG, BMP, etc., drawing over the text will wipe out the original information, it will not be recoverable if you use a 100% opaque color.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .