> just mask the sensitive data with a single color which is impossible to reverse (for rasterized images, this is not a good idea for PDFs
Also not a good idea for masking already compressed images of text, like jpg, because some of the information might bleed out in uncovered areas.
Interesting - does a little extra coverage solve this or is it possible to use distant pixels to find the original?
I'm not super familiar with the jpeg format, but iirc h.264 uses 16x16 blocks, so if jpeg is the same then padding of 16px on all sides would presumably block all possible information leakage?
Except the size of the blocked section ofc. E.g If you know it's a person's name, from a fixed list of people, well "Huckleberry" and "Tom" are very different lengths.
yep, some padding fixes this
JPEG compression can only move information at most 16px away, because it works on 8x8 pixel blocks, on a 2x down-sampled version of the chroma channels of the image (at least the most common form of it does)