I found this CodeProject article written by Daniel Fisher containing a simple C# implementation of a image to ASCII art conversion algorithm.
These are the steps the program/library performs:
- Load the Image stream to a bitmap object
- Grayscale the bitmap using a Graphics object
- Loop through the image's pixels (because we don't want one ASCII character per pixel, we take one per 10 x 5)
- To let every pixel influence the resulting ASCII char, we loop them and calculate the brightness of the amount of the current 10 x 5 block.
- Finally, append different ASCII characters based for the current block on the calculated amount.
Quite easy, isn't it?
BTW: In the comments to the article I found this cool AJAX implementation: Gaia Ajax ASCII Art Generator:
[...] I felt compelled to demonstrate
it could easily be done in a
standardized set of web technologies.
I set out to see if I could find some
libraries to use, and I found Sau Fan
Lee's codeproject article about his
ASCII fying .NET library.
P.S.: Lucas (see comments) found another CodeProject article.