1
$\begingroup$

I was reading some stuff on steganography.

There is an example on the wikipedia page :

enter image description here

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).

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

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.