Computer Science 15-112, Spring 2014
Class Notes:  Steganography (Image Manipulation and Encryption)

  1. See the Wikipedia page on Steganography
    Goal:  To conceal a private image inside a public image, creating an encoded image that looks like the public image but secretly contains the private image.  Then, to send the encoded image to a recipient who can then decode the image and reconstruct the original private image.
  2. Start with this private image (download it to privateImage.gif):

  3. Also start with this image (download it to publicImage.gif):

  4. Run this code:
  5. And it produces this encoded image (stored in encodedImage.gif):

  6. Let's see the public and encoded images side-by-side:
    original public image encoded image for transmission


  7. Now, send the encodedImage.gif to your recipient
    You may include some innocuous and irrelevant text, like: "Hey, can you believe this guy pitched a cat?!?  Seriously, no Photoshop here.  Amazing!"
  8. Your recipient saves encodedImage.gif and then runs this code:
  9. And it produces this decoded image (stored in decodedImage.gif):

carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem