You are here


Hi !

It's possible to create a script for make ASCII/ANSI art ?
With Gimp we can just save a image in text. Gimp have not script for this. And it's just text. No colors.
It's more practical to make it with a script, for choice color lettering and background, number of lines, write left to right or right to left, or up to down

For example :

everything is possible. But did you try to google for appropriate tool? I believe you are not the first person who is interested in anything like this and there must be a lot of tools that can do what you want.

I believe this is not simple image to ASCII text conversion. Perhaps author first converted image to text (black letters on white background) and than by hand colorized it?

EDIT: I also noticed that some letters are blurred and this was done "by hand" as well, I presume...

EDIT2: I just google for what ANSI means. So I partialy take back what I wrote about manual "postprocessing" of ASCII image...

Yes, there are tools for make this, but it's more simple to have a script for gimp and not have to switch for an external software.

a script for this effect using the tutorial and steps above.

Your examples tricks are not ANSI/ASCII. It's like a pattern above an image.
The text is not generate specificly for the image.
Letters and signs are not selected for follow the shapes of the elements of the image.

Other example :

mine is just more enhanced by adding the background and inverted color layer.
Check out this thread
To get the results you want just follow these instructions.
open your image
give it an alpha channel
create a text layer - any font and any size
set the line spacing (width between text lines)
alpha to select the text layer
select your image layer
go to edit>copy edit>paste
create new layer to place the text you copied out of the image into a new layer.
make the image and original text layers invisible.

And there you go - colored ASCII text into an image.If you duplicate it a bunch of times it gives more contrast and saturation to the colors.

You said you wanted a script to do it for you...i actually may have one for you soon thanks to paynekj. :)
Another option is to download this freeware program

Either way good luck.

if you are interested. :)

For the moment I have tried to use Save As > Type of file : Art ASCII.
And after, import the text in th Text box, but there is no option for activate/inactivate return of the line. Because without this, the text isn't like the image. :/

Somebody know if it's possible in Gimp ? Because in a text editor it's possible. And without this it's bad.

@wacmaster : I wait the paynekj's script for see that.

you need to OPEN as a ASCII file in Gimp.Much like a png-apng file is opened again in Gimp.
The script is available through that link i posted earlier. (script request)

I don't believe there is any way to OPEN an ASCII art file in GIMP (barring the existence of any third-party plug-in).

Please enlighten me if I've missed something.

you are correct Saulgoode, there is no way to save ASCII art files in Gimp.(Unless they are text)
I was just suggesting to save a file should open a file as.

I thought they meant txt file extension Saul. :)

You can always try to use a cool script-fu called mean-fill and the text as the selection islands, but not sure if that will actually work. The other way is to use a program like ASCIIGen (open source) to created the solid single color characters that you are looking for. :)

@lylejk : cool two faces examples. And the 1st has a little bit pixel art. :)
For mean-fill script, I don't understand you want with it, but I have think a trick like this with Blur>Pixelized in the image, and add ASCII text in the top. And add others tricks for colorize the text.

Also, I did figure out how to turn a bitmap to ANSI a while back. It sort of requires several (but all free; some are open source) tools to do however. Check out my thread below and also look at both examples that I posted. :)

is to open any image - right click and add alpha channel
Now create your text (or paste it from a text file), on a new transparent layer, and alpha to select it.Select your image layer and go to-
Edit>Copy>Edit>Paste and select new layer to set the new copied text on its own layer..make sure to set the line spacing accordingly.(squish the text lines together closer).
Duplicate the text layer you copied and go to Colors > Invert.
Set that inverted text layer to grain extract.
Add a new layer (black for the background)
Make the text layer (with the T in the layer dialog) invisible along with the actual image layer.

Some more text art examples

One question about the text itself. Here in this example you repeat the same text - this is simple to do. But in other examples, or rather in classic ASCII art letters are dependant on original image, I believe brightness. So I presume you are interested in the first option - repeating the same text.

I also visited your link and looked on examples, I understand that these examples are far behind of what you are asking now.

However I can not help you, I dont know how to write scripts, I'm just curious ...

Subscribe to Comments for "ASCII/ANSI art"