mayan hieroglyphs

/code/ImageToText
  zipped souce

This is a little program I wrote in response to another site I found while poking around on the web. It takes an image (GIF / JPEG / PNG / BMP) as in input and spits out some HTML representing the image to a file.

I thought the idea was pretty cool, and I was wondering how it was done, so I started playing around with the System.Drawing namespace in the new .NET framework. I found the Bitmap object, which lets me get access to each pixel in an image, and the static FromFile method on the Image object that parses a number of different image formats. Really cool.

So, I just spin though the image a block at a time (usually 4 x 6, but it can change). I average the colors in the block into one color and then spit out a "pixel" of the averaged color. It's really pretty simple. Going forward, maybe an enhancement to up the brightness for the pixels? The images seem dark overall. Oh well.

If you have comments or patches or anything, lemme know.

Samples
  original    [from Penny Arcade]
  converted

  original - sorry ladies, he's taken
  converted

  original - ditto
  converted