ASCGEN dotNET Tutorial 1 - Creating an ASCII image

Posted in September 25th, 2006
Published in Tutorials

(Document v3.0, using Ascgen dotNET 0.9.7(pre), updated 20080402)

In the first in a series of tutorials on how to use the ASCGEN dotNET, I show you how to convert an image to a high quality fixed width text image with just a few simple steps and very little effort.

We will be going from this

Original Image to Output


First, a quick lesson about fonts or just skip ahead to the tutorial.

There are two main types of font: Fixed Width, which has one specific size for every character, and Variable Width, which has a fixed height but the width can vary between different characters.

Fixed width fonts such as Courier New, Lucida Console, Fixedsys are traditionally used for ASCII art, however most word processors use a variable width font like Times New Roman, or Arial.

When you have selected a fixed width font, at the top of the program you will see the “Ramp” toolbar used for setting the current ASCII ramp. When you use a variable width font, you will instead see the “Characters” toolbar, which is used for setting the conversion characters.

Fixed Width vs Variable Width Toolbar

The ASCGEN dotNET is the first and only program able to convert images into ASCII art made for variable width fonts. We will cover variable width font conversions in a future tutorial, but for now let’s start with the default fixed width font.

Tutorial One: Creating your first image

Get a suitable image into the program

For this tutorial I will be using the following image, which was taken from a royalty free stock photo archive.

Original Image

Go to “File/Load” or double-click the image area and select the image, or you can drag and drop the image onto the image tab or just copy it and paste it with “File/Import from Clipboard”.

Loaded Image

Select an area of the image
When we convert the image, its resolution is reduced to the output size in memory, which means that small details will be lost or difficult to see. To produce the best output, we need to zoom in and concentrate on the main subject of the image.

So, imagine a box around the person or thing you want to see, then click on a corner and drag to create the selection area.

Selected Image

Click and drag the box to move it around, and use the white boxes to adjust the size. Make the input image bigger by dragging the separator between the text and image if needed.

Select the output font
For this tutorial, we will leave it at the default font settings which are Lucida Console, 9pt. The “Auto” button on the toolbar should be pushed down by default, which has the program create an accurate ASCII ramp for the font, and the ramp box will be grayed out.

Switch to full screen mode
To get a better view of the output, switch to full screen by clicking the Full Screen Button button, or pressing F11. You could also hide the input image by clicking the Image Display Button or pressing F12.

Full Screen

Adjust the brightness/contrast and levels for the output

To get the best results, the ASCGEN dotNET allows you to adjust the output image in real time through the Text widget.

The recommended method for adjusting the text is through the levels control. This shows you a histogram of the current image, and allows you to adjust the minimum, median and maximum values in exactly the same way as you would in photoshop and other photo applications.

Levels Control

Choose the ‘Levels’ tab if it isn’t currently visible. Using this will make the image use the whole range of the output ramp, and can drastically improve the results.

Click and drag the black slider to adjust the minimum level. Try and put it near the first peak. Then, click and drag the white slider to adjust the maximum level. Try and put it around the last peak. If necessary, adjust the grey slider a little to set the middle point of the range. Just play around with the settings until you are happy with the results.

Another available method is adjusting the output Brightness/Contrast by switching to its tab on the text widget. This works in a similar way to the Levels, however the contrast effect will be cancelled out if the output is being stretched (”Edit/Output/Stretch” or right-click the output and uncheck “Stretch”).

Dithering is a method of introducing noise which helps to blend the characters together to improve the output.

The finished image

Save the text image
Now the image is finished, we just need to save it.

Go to “File/Save As…” and the save dialog will appear.

Save Dialog

Let’s leave Colour conversions for now. The default is black and white output, so make sure that is selected and also the output type is text.

Set the “Save as type” drop down box for how you want to output the text image:

  • Plain Text - Save the text without any font information (remember to set the correct font when you display it)
  • Plain Text (Unicode) - Same as above, but will save as a unicode text file that can store ANSI and other non standard characters
  • NFO - Same as Plain Text (Unicode), but with the .nfo extension
  • Rich Text - Saves the text and font settings as a rtf file that can be opened by wordprocessors
  • XHTML 1.1 - Saves the image and font settings to a valid html file that can be opened by web browsers.

An alternative way to save the image is by clicking on Image which will output the text into an image format.

Save as an Image

This is useful if you want to make sure the image will be displayed looking exactly as it should look without having to worry about the font.

By default the image is resized to 75% of its original size, but you can adjust up to 100% (the actual text size) with the slider or down to 25%. Use the arrow keys to adjust the size in smaller increments to the exact dimensions you want. Click “Ok”, then set the output filename and type (.gif usually produces the smallest output sizes), and we’re done.

Output

29 Users Commented In " ASCGEN dotNET Tutorial 1 - Creating an ASCII image "

Subscribes to this post Comment RSS or TrackBack URL
Dwayne says,
10-1-2006 at 03:23:09 from 211.27.202.83    

By the way, good first entry. :)

Dhruv Jayal says,
12-7-2006 at 11:16:44 from 59.94.132.160    

Man.. i must say this software is awesome…. i juts downloaded it and it’ blew my mind.. Keep at it. man…

Luke says,
12-19-2006 at 15:17:32 from 84.155.199.147    

Whow is the BEST ASCII-Programm ice ever seen. real impresive work!

gustavo says,
1-5-2007 at 16:12:44 from 201.5.54.173    

minhas imagens sony

@Lien_Zed says,
1-13-2007 at 05:52:52 from 220.245.180.133    

AWESOME! I have been looking for something like this for ages.
well done, keep it up

Stephen Cameron says,
2-4-2007 at 04:26:18 from 203.220.53.166    

she’s pretty cute

Irenice says,
3-1-2007 at 19:18:35 from 201.24.61.227    

Eu gostaria muito de saber como faço para transformar uma foto que tenho no meu PC para ascii

Mugunth says,
6-21-2007 at 11:42:19 from 220.227.64.170    

Simply superb!!!
awsome…
I got this through Digit CD (http://thinkdigit.com)…
Mindblowing work…

Ben says,
6-25-2007 at 03:10:35 from 220.239.108.93    

Hi Where can i get this cool program from???

Jonathan says,
6-25-2007 at 09:13:24 from 82.29.14.190    

The download link at the top of the page:
http://sourceforge.net/project/showfiles.php?group_id=133786

7-4-2007 at 13:13:53 from 59.95.112.122    

Simply Amazing

László Kiss says,
8-12-2007 at 17:48:02 from 80.244.98.66    

It’s Great!
But…
Where are the colors?

16 or 256 color characters on black backround for console arts and white (or colored) background for posters…

Jonathan says,
8-13-2007 at 07:52:32 from 86.22.119.132    

“File/Save as Colour Text”

vegeta says,
8-19-2007 at 15:12:45 from 85.242.253.92    

How can I post a comment on the hi5 with a ascii photo

Wilson Esprag says,
9-4-2007 at 21:36:48 from 201.83.224.230    

Excelente programa para tranformar fotos em texto.
Parabens!

Darryn says,
9-16-2007 at 10:35:59 from 196.11.241.45    

This is great!!! You should develop a matrix filter! And a colour image exporter such as saving as .jpg/.tif

Jonathan says,
9-16-2007 at 23:51:55 from 86.22.119.132    

Saving colour image files is ready for the next release.

I’m not sure how that filter would work (assuming I understand what you mean). Randomly make vertical gaps and output in green on black background? Actually, that would be pretty cool…

carlosaram says,
9-19-2007 at 03:08:23 from 189.182.38.171    

how can i make the text or the images SMALLER for using them in other apliccattions?
thanks!

Jonathan says,
9-19-2007 at 23:30:40 from 86.22.119.132    

Just change the width or height in the toolbar where it says “Size”.

I should probably add something about that in the tutorial.

PhotoMasterGreg says,
9-21-2007 at 21:06:00 from 68.37.127.97    

I have used other programs and was never really pleased with the output. This program is incredible! Keep up the great job guys!

Greg

papcis says,
10-10-2007 at 18:35:30 from 41.208.137.134    

Wow, this is the best so far, nice work, keep going

Ceetrick says,
10-18-2007 at 12:43:26 from 190.46.219.117    

far the best ascii image program ever seen

BigBob says,
11-23-2007 at 04:04:54 from 203.122.194.117    

This is simply an astonishing program. Don’t know how much time (a lot I presume) was put into it but it was time well spent!
Well done Jonathan!

12-31-2007 at 18:46:12 from 87.4.212.93    

i’m not english, i’m italian but this software is very beautiful, it’s incredible and i like tish website, but i can’t make a text over the image… it’s possible???
Thanks

3-16-2008 at 14:45:10 from 62.249.180.204    

Howdy, why don’t you port it to WEB by using Gaia, take a look at what I did spending an hour of porting an existing ASCII art generator at codeproject; http://ajaxwidgets.com/Ascii-Art/AsciiArt.aspx

.t

Jonathan says,
4-2-2008 at 17:00:49 from 86.22.119.132    

That Gaia thing is a very cool looking system. I’ll definitely check it out when I get a chance.


#Frodohack#: That’s on my todo list, but there are some technical issues that I need to work on.

p.s. Updated the tutorial for the current version.

Ian_ says,
6-22-2008 at 02:52:52 from 189.81.125.170    

cool

TuchoBM says,
7-6-2008 at 10:11:47 from 84.124.197.154    

Great!!

It help me to learn more about programming in C#.

Thanks!

Trackback & Pingback
6-17-2007 at 22:01:59 from 70.86.74.242    

Leave Your Reply Below

 Username

 Email Address

 Website

Sticky note: Please double check your comments before submit Please Note: The comment moderation maybe active so there is no need to resubmit your comment