i need to convert an image to ascii text so that the image is still visible
somethigng like http://asciiconvert.com/
any ideas as to how i can go about it ?

Recommended Answers

All 3 Replies

The link that you provided in asciiconvert.com simple does not work. If it works for you please explain what you are doing in steps an tell you if this is correct.

It actually does work but not very well. You have to click on the Gallery link to see your results somewhere in the gallery.

It converts an image into ASCII art versions of the supplied picture.

Unfortunately, I don't really know much about the algorithm that goes behind converting an image into ascii art.

I'll dare to brainstorm since nobody has answered this in two days and I am a little nostalgic for good ASCII art :)
I expect that the image gets divided up into a grid (say 5 pixels square or whatever.) Each square in the grid is sampled to determine what the average color is (average of Red, Green, and Blue components of the pixels present.) Once you have that, you have a color. Break that down into Hue, Saturation, and Value (HSV.) The Hue and Saturation become the color of the letter and the Value is mapped to an ascii character... So, on a black background, a period is really dark and characters like 'W#@' are bright.

Once you have that working, it may even be possible to refine the algorithm to glean clues as to form in picking the right characters.

Good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.