CAZine: issue 8, February 2010

CAZine: issue 8, February 2010

Post of the Month

By: Cyben

Hi guys,

In the last hour or so I made a fun little toy to play with:

Encoded

You can encode a surprisingly large amount of data “invisibly” into an image, and I’m quite impressed with the amount of data I can shove in there without any visible change at all. It doesn’t use passwords or need the original image in order to decode a message, so if someone intercepts your image and for some reason knows it (1) has a message in it and (2) was encoded using my encoder, the game is up (so ideally encrypt your message before you encode it!)

Basically the way it works is it converts your message into a binary string, then for each pixel of the image it encodes 3 bits, one into R,G,B respectively: if the color was odd and the bit is a 0, subtract 1; if the color was even and the bit is a 1, add 1. The string is then terminated with a null byte (‘00000000′). Thus, if you were using a completely white image and your binary message began with:

010111010101

the first couple pixels would undergo this transformation:
(255,255,255) -> (254,255,254)
(255,255,255) -> (255,255,255) — unchanged
(255,255,255) -> (254,255,254)
(255,255,255) -> (255,254,255)

This really is completely invisible to the naked eye even on white images, and you can encode a surprisingly large amount of data into a relatively small image. See the example in this message :)

PS. It does absolutely NO error checking whatsoever yet, because I’m lazy. So please don’t try uploading a word-document or something :-\ It would probably fail, but who knows. Oh yeah and all images are returned in png to avoid jpg loss

VN:F [1.7.9_1023]
Rating: 10.0/10 (3 votes cast)
CAZine: issue 8, February 201010.0103

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

About the Author