In my random boredom, I threw together a little program in C to take any file and prepend it with a bitmap image file header (and pad the end of the file as necessary). This produces BMP images that allow you to literally “see” the file you’ve converted. And if you were to open the resulting BMP’s, after some junk header text, you’d see the original contents of the entire file.
I tried this on a few books to see what they looked like.
Homer’s “The Iliad”, whose text was taken directly from the archives at Project Gutenberg.
Charles Dickens’s “A Tale of Two Cities”, whose text was also found at Project Gutenberg.
The Holy Bible, King James Version, downloaded here.
The images above link to compressed JPEG versions that I uploaded to Flickr. You can find the original BMP files, generously hosted by my fiancee, here: The Iliad, A Tale of Two Cities, the Bible. Try opening up the BMP’s in a text editor and note that the original, converted text is still intact.
I’ve also made available the executable that you can use to try the image conversion yourself. The EXE takes the original file path and the width of the output image as parameters. The width is rounded up to the nearest multiple of eight pixels. I also credit this site for the BMP header info.
On a related note, I found a similar open-source application called Steghide, a steganography application that compresses and encodes data and inserts it undetectably into image or audio files, after which the data can be extracted with the correct passkey. It’s a more involved and secretive way of embedding data into a media file, but it wasn’t exactly what I was trying to accomplish. I was hoping just to see what text as image data would look like and whether there were any compelling or interesting patterns. I’ll leave that up to you to decide.





