# The example of Wikipedia on steganography doesn't work

I was reading some stuff on steganography.

However, I tried many software to get the hidden image, but no one worked. Is there anything wrong about that?

I tried OpenStego (Windows), SecretLayer (Windows) and VSL (Linux).

• I don't know what those programs do, but taking the two low bits manually does give the cat. – otus Oct 8 '15 at 17:40

The Wikipedia example is something you probably would not really want to do, but does demonstrate just how much information you can add to a non-lossy image format without it being obvious to the human eye.

Importantly, the technique used in Wikipedia only works for hiding a lower-quality image of the same dimensions as the container in the low bits of the main image. More general steganography programs will attempt to store more arbitrary messages, and will use different storage strategies. It is unlikely that any would support the example approach for "hidden-image-in-image" shown in Wikipedia. Instead you can verify the Wikipedia example using a short program in e.g. Matlab, to mask out and re-normalise the low bits.

In pseudocode:

tree_image_pixels <- load_image( 'example.png' )
cat_pixels <- ( tree_image_pixels & 3 ) * 85
save_image_from_pixels( 'cat.png', cat_pixels )


The value of 85 is so that maximum pixel value is 3 * 85 = 255, using the full colour range. Lower values also work, but produce a less bright image.

• I'd multiply with 85, so maximal value of 3 turns into 255 – CodesInChaos Oct 9 '15 at 7:34
• Here's the non-pseudo Python code I hacked together last night to verify it. – otus Oct 9 '15 at 10:28