JPEG Poetry

I have been a few days looking for lossy images of myself, avatars, Google results, but due to an intense effort of erasing my online history, now I do not keep many examples of the good old Internet times… In the process of understanding how can work with these lossy images, first I researched how our JPEG images are generated and compressed and I found the website FotoForensics, which explains different methods to analyze images in search of digital manipulations and retouches. One of them is called Error Level Analysis which ‘permits identifying areas within an image that are at different compression levels.’ Original raw images from cameras normally have a great level of detail and contrast which produces higher ELA values (brighter colors), especially in the borders:

Original JPEG image
ELA from Original JPEG image

‘JPEG compression attempts to create patterns in the color values in order to reduce the amount of data that needs to be recorded, thereby reducing the file size. In order to create these patterns, some color values are approximated to match those of nearby pixels.’ The resulting image usually is less contrasted (borders are less defined) and therefore, ELA will produce a darker image.

Compressed JPEG image
ELA from Compressed JPEG image

When editing the image removing the background and placing a radial gradient made of two very similar colors, ELA reveals a  ‘visible separation between the luminance and chrominance channels as a blue/purple/red coloring called rainbowing’.  Under ELA, uniform areas indicate image manipulation.

Edited JPEG image
ELA from Edited JPEG image reveals a rainbow pattern in the background (click for zoom)

After all this testing time, I thought this analysis also could be reverted to encrypt messages under the areas that have been digitally manipulated, although not so much to be perceived from the JPEG image. Here, I have used a text as a mask in Photoshop and later a gaussian blur affecting that area of pixels.

Manipulated JPEG image (hidden message)
ELA from Manipulated JPEG image (message revealed)

Check also ‘steganography,’ a method that attaches bits of a file to the background noise of JPEG images. It is used to encrypt conversations or documents inside image files: Steganography in contemporary cyberattacks