Tuesday, December 30, 2008

source packed in images.



I'm sick of posting source code in the text. I want to be able to upload any file, but all they let you upload is images. I wrote some c++ code to input any file and embed the contents as the pixels of an image (will only work with lossless encoding). The source code for this example is in one of the small images in this blog (the other is the python source of the previous posting). Too bad I couldn't upload a tga,tiff,or pgm, because those files you could just open as text and see the source. I leave it up to you to extract the code from the png.


Hint: convert to pgm (gray-scale) and open with an image editor.


convert image.png p.pgm
cat p.pgm

No comments: