Anti-aliasing
Created | Updated Oct 7, 2004
'Anti-aliasing' or 'antialiasing' or just 'aliasing' is a term used in digital art. An anti-aliased line is one that has been made fuzzy at the edges so that it looks smooth rather than stepped.
Why does my picture look blocky?
Digital pictures are made up of little squares called pixels and each pixel can only be assigned one colour at a time. Often you can see a stepped effect around shapes caused by the pixels and this makes the drawing look rather amateur. The solution to this is antialiasing.
Imagine the border between an area of black pixels and an area of white ones. If, instead of going straight from black to white, we introduce a few grey pixels along the border then, when the picture is viewed from a distance, the transition will be softened and look more like a real painting or sketch. So instead of going black, black, black, white, white, white we go black, black, dark grey, light grey, white, white. This is antialiasing.
Most graphics packages provide you with a number of tools that can affect the colour of the pixels in the working area (the 'canvas'). They fall into two main types: raster tools and vector tools. Both can be used to give an antialiased effect.
What is the difference between raster tools and vector tools?
Raster tools are given names familiar to us from real life art like pencils, paintbrushes, airbrushes. There is no real-life equivalent of vector tools but if you can imagine contructing pictures by pinning coloured rubber bands to a board you'll get the idea.
Vector drawing tools are sometimes referred to as the 'path' tool or the 'bezier' tool. It takes a while to get used to vector drawing tools but it is worth the effort. Imagine if the star on a flag was a bezier shape. You'd be able to resize it, move it around and change its colour very easily and you'd be able to copy it and make it very small to make more convincing 'stars' (well, fuzzy dots that look like starts from a distance) on, say, the American flag. As the star is moved around the canvas, your graphics program will automatically calculate the fuzziness around the edges - you don't have to do anything else. This is true antialiasing.
How so I antialias an existing picture?
Existing pictures can be tidied up to give an effect like antialiasing using the raster tools. There are three ways of doing it.
Use a fuzzy paintbrush
Using the pencil tool is nearly always a mistake because it only affects one pixel at a time. It's much better to use the paintbrushes or the airbrush because these affect a group of neighbouring pixels to give a fuzzy effect. You are usually offered a range of paintbrush settings. Choose one with some fuzziness around it. Then paint over an existing jaggied picture.
Work three times bigger than you intend the final picture to be
When using paintbrush tools or airbrushes a good trick is to work on a canvas that's three time the size you want the final image to be whilst viewing the canvas at 33% magnification. When you reduce a large canvas to a third of its size the graphics program has to take each group of nine pixels and decide which single colour would best represent the average of them. As a result, at colour boundaries we usually get an effect similar to antialiasing but sometime we get some strange decisions so you might have to go over the final image and correct a few pixels.
Use a partly transparent pencil
There's a third way. If you set the opacity of the pencil tool to less than 100% you can anti-alias by hand. Imagine you had a boundary between red and blue. You set your pencil tool to red with an opacity of 20%. When you click on a blue pixel it will turn a blueish purple - 80% blue and 20% red. Click on the same pixel again and it will become redder - 60% blue, 40% red etc. It's a method suitable for small areas of touching up. If you tried to anti-alias a whole picture in that way you'd probably go mad.
Talking of going mad - it is possible to sample adjacent colours and calculate the correct anti-aliasing colour for each pixel mathematically. That's one for the obsessives, I think .