The algorithm is as follows:
1. Scale an image to some width
2. Convert the image to greyscale
3. Traverse the image pixel by pixel and choose from a list of predefined values the value corresponding to the greyscale of every pixel.
I have used the icy-ubuntu image from:
[http://gnome-look.org/content/preview.php?preview=1&id=73000&file1=73000-1.jpg&file2=73000-2.jpg&file3=73000-3.jpg&name=Icy+Linux] for my tests:

Converted to ascii art it looked like:

I have also tried them with the image of S. Balmer from the abovementioned website (bestinclass.dk), printing at 40 characters per line, and the results were as follows:

And the code:
No comments:
Post a Comment