Original Usenet thread from alt.ascii-art, started 9 Feb 1999.
GIF / BMP / TIF etc. => ASCII
alt.ascii-art
· 4 messages · 9 Feb 1999 - 14 Feb 1999
hi, does anyone know where i can find a "picture => ascii" converter??? i found some pics in the net which can't be handmade !!! if you don't know this? what algorithm do i have to use??? thanx, marcel
Actually Marcel,
I think those programs are a total waste of your time. The pix look like
crap, and you delete them anyway. Why bother taking up space that you could
use for some really cool programs, like Bubble Puzzle, or Whack!, or MathBlaster.
Hope this helps...... JRO
Marcel Gleis schrieb in Nachricht <918...@emil.nef.wh.uni-dortmund.de>... >hi, >does anyone know where i can find a "picture => ascii" converter??? i found >some pics in the net which can't be handmade !!! > > > >if you don't know this? what algorithm do i have to use??? > >thanx, >marcel > > There are a lot of programs to do this: GIFscii, ASCgif, BMP2TXT, ... I think you will found most of them here: ftp://ftp.wwa.com/pub/Scarecrow/Software/ gopher://twinbrook.cis.uab.edu/1A/atools.70 ---- I know no program which supports GIF,BMP & TIF together. In my opinion it isn't important what kind of input format is used. All pictures must me converted to gray scale with maximal 94 colors because ASCII art can only simulate gray shades by using different characters. The main conversion from pixels to characters has no real algorithm. The reason is that the char's aren't sorted by their 'darkness'. I think most of the programs use therefore a intern character pattern. Alternative it might be possible to let the prog. sort them by checking the black shade of each character (counted black pixels depending from the current font). Nevertheless I don't believe that this is a good idea, because it costs some time and the result will not be better. The main problem is that there is no algorithm which can calculate a "best viewed with human eyes" character. You could reduce the used characters because many of them didn't have enough contrast (W-M, Q-G, 1-I, ...), but this will only help a bit. In my opinion you must always replace some characters manually to become a really good result. If it isn't important for you that the color to character conversion considers the darkness you can use a simple algorithm like this one: (should use a gray scaled picture, colors mustn't be indexed) ] CONST ] maxRGBcolor : Integer (Normally white, RGB=16777215) ] step : maxRGBcolor/94, Extend ] ] VAR ] Pixcolor : Current RGB value, Integer ] (Example Pixcolor:=colortoRGB(pixel[x,y]) ] Char1 : Current Character, char ] ] ] Char1 := chr(126-round(Pixcolor/step))) //126 = last ASCII char. [This is NO program source, you need to translate it in your programming language ;)] You can make a function of this and convert the pixel colors to a character. A simple way to make this function better is to convert all RGB values less than ~3000 to '#' (more than ~16770400 to SPACE). Although this is a very easy way to handle the conversion you become much better results with an intern pattern. You sort the characters by the 'darkness' and put them in a array. Then you can read then for example in this way. ] pattern: Array[1..94] of char ('#','W','X' .... '~','.',' ') ] ] Char1 := Pattern[round(Pixcolor/step))] Ok. I think that's enough. Bye Marc PS. University of Dortmund, Germany... :-) O=============================================O ,,,,,,,, I __ __ ___ ___ _ _ _,,,_ I .,,, __ \_ I |M \/ M| |E__| |P_ \ | || | ASCII / o o \ I ( ( o) \_ I | |\/| | | _| | _/ | HH | & more > P < I `\ o)I |_| |_| |E__| |_P |_||_| ~~~~~~ \_\_/_/ I \ \____/ I I \ ____/ I ASCII-, ANSI-, HTML-art, programs, ... I ) ) O=============================================O \__/ \ Index page: \\_ ) http://studenten.freepage.de/meph/ascii/ascii.htm \___ __ / English "fast-link" page: _// \\_ http://studenten.freepage.de/meph/ascii/eng/eng.htm
.----- On Tue, 9 Feb 1999 10:48:54 +0100, Marcel Gleis posted:
|hi,
|does anyone know where i can find a "picture => ascii" converter??? i found
|some pics in the net which can't be handmade !!!
|
|
|
|if you don't know this? what algorithm do i have to use???
|
|thanx,
|marcel
|
|
'---------------------------------
There are lots of these programs, but the URLs for those have already been
posted, and are in the FAQ list.
As for algorithms, the best you can do really is to have a character for
each shade of grey. I found an ASCII-greyscale with 16 shades that works
quite well because I used a program to give me a list of the intensity
(amount of 'on' pxls) of each character.
'The Martin Atkins Algorithm' is as follows...
1234567890123456
-;/itxf$3Sm&RNM
This works with 16 different shades of grey, and gives perfect results if
you feed the output into ASC2PIC2, a greyscale ascii viewer.
Quite a few of the converters allow you to specify an 'algorithm' or
greyscale to use. ASCII ART (or BMP2ASC) uses exactly the format above,
which is why I made it with 16 colours. Other converters give you more
shades, but I don't think you can get over 100 different shades.
Hope this helps in some way,
-Martin
_
____.Martin Atkins AKA mga.____ / |
""""-mart.atkins bigfoot.com-"""" /@ |
___________________________________/___|_
__/___| o o o o o o o o o o o A _______
| _-"
-________________\ \____________-"
\_____\ mga
If you are new to the newsgroup, please read
our FAQ list - posted weekly and on the web
at http://vibes.vossnet.co.uk/i/ighaig/ascfaq.htm
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this thread.
These messages were posted publicly to the newsgroup
alt.ascii-art
in 1999 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.