How can you hide information inside a jpg or gif photo?

M. A. Kishawy picture M. A. Kishawy · Aug 1, 2009 · Viewed 59.2k times · Source

How can I write some information inside a photo file like jpg or gif without destroying the image? and of course without showing it on the photo since the whole idea is to send information in the file of photo undetected by anyone (to provide security/privacy to some extent)!

Answer

Maik picture Maik · Aug 1, 2009

You can concatenate a gif and a zip (the information you want to hide) into one file. Gifs are read from the start of the file, while zips are read from the end of the file.

To create such a file in linux:

$ cat file1.gif >> outfile.gif
$ cat file2.zip >> outfile.gif

The resulting file should have the size of file1.gif and file2.zip together and should be openable by any gif viewer and zip file handler.