The Picture that talks!!

Posted: June 6, 2010 in Image Processing, Python

Does anything seems special to this image..?? nah?? its just a simple jpeg image…a very usual one…now here is what can make it special…This simple jpeg image can be use to hide out a secret message. There 2 simple programs demonstrated here. The first one encodes the image, hides your message and creates a file encrypted_image.bmp . The program uses a very simple technique. The first row of pixels along the X-axis encodes a password supplied by you before the encryption is done. After this is done you can enter the message to be encoded. The program gathers the ascii value of each character in the message supplied by you. Now it replaces the R-values(Red) of the pixels at pre-defined points by inserting the ascii of each character in you message.

Similarly, the decrypt.py file decodes the encrpyted_image.bmp generated by the first code and re-produces the message inserted into the picture. For the decryption process to begin, the password supplied at the encoding code, and the message length(shown when the encoding is complete) must be used.

The programs use very easy way to select the “selective pixels”. Encoding can be made harder using some algorithm.Ah! forgot to tell…there wont be any visible difference in the encrypted_image.bmp generated!! . This is because only a very few pixels form selected points are being replaced…!!

Download complete source here:-

Encryption code

Decryption Code

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s