This program converts a text file into a .BMP image which if opened in a text editor displays the original text.
Example usage:
gcc -o text2bmp text2bmp.cpp
text2bmp.exe
Enter the name of file:
the last question.txt
I came across this image on StackOverflow many years ago where someone drew an image in MS Paint which when opened in a text editor displayed a Hello World program. To me the whole process seemed like incomprehensible arcane sorcery back then and it practically blew my mind. Now a few years later I decided to experiment with BMP headers an afternoon, and shortly after this program was born.
Here we have a seemingly uninteresting image:
When opened in a text editor:
Crikey! It was actually Isaac Asimov in disguise!