Page 1 of 1
How to make ASCII ART effect using Imagemagick?
Posted: 2011-12-11T06:35:07-07:00
by agriz
Hi,
Is it possible to create Ascii Image for an original image. I search around the web, I didn't get much clue to do it using imagemagick.
Thanks
Re: How to make ASCII ART effect using Imagemagick?
Posted: 2011-12-11T11:59:36-07:00
by fmw42
You would need to get the average graylevel of each letter in the alphabet (caps and lowercase and other characters) for some fixed width font. Put that into a database (or array). Then measure the average graylevel of your image in same size blocks as your alphabet. Then replace each block of the image with the closest graylevel character.
I don't believe that IM can do that right now. Though Anthony may have scripted something like that. See his scripts at
http://www.imagemagick.org/Usage/scripts/. I think he may have done something similar but using small photos rather than characters. Perhaps he will have more information or reference to some other software.
see also lots of online generators:'
http://www.glassgiant.com/ascii/
http://ascii.mastervb.net/
http://www.ascii-art-generator.org/
http://www.degraeve.com/img2txt.php
http://sporkforge.com/imaging/ascii.php
http://www.typorganism.com/asciiomatic/
http://www.fileguru.com/apps/ascii_art_maker_pro_apk
http://aa-project.sourceforge.net/aalib/
http://www.codeproject.com/KB/web-image ... Fc%5F.aspx
see also
http://en.wikipedia.org/wiki/ASCII_art_converters
http://www.cse.cuhk.edu.hk/~ttwong/pape ... ciiart.pdf
Re: How to make ASCII ART effect using Imagemagick?
Posted: 2011-12-11T19:51:41-07:00
by anthony
There was some older posts where we were generating grey squares, and then replacing those squares with various sized circles. This is the same, but replacing with letters, rather than circles.
viewtopic.php?f=1&t=17389&start=15
However a slight improvement may be to not just map intensity but also some of the letters shape. That is making things like diagonal lines match slashes and forward slashes. This is more complicated though I have seen some ascii-art programs (sorry no pointers on hand) that can do this.
Similarly using multiple overlaid characters can also generate darker areas than just using # or @ charcaters on their own.