What is Aliasing

Aliasing describes an obvious patter in low-resolution data.

Since images are made up of arrays of pixels you will sometimes create a condition where they will become noticeable. In 2-dimensional images will appear mostly in the edges of highly contrasing objects in images will low resolutions.

Anti-Aliasing is the method by which aliasing is made less obvious, smoothing the information.

Typical image anti-aliasing techniques are automatically calculated by the software and involve changing pixel colors to transition from one area to another. Imagine a black object on a white background. The user has only defined the two colors, but the software may add dark grey, grey, and light grey pixels to create a smooether appearance.

Because the resolution of device displays is getting denser, and pixels are becoming smaller as more are fit into the same surface area of each device, the actual effect of aliasing is becoming less noticeable over time.

None the less, it's an important concept to understand as it may be the cause of some undesirable artifacting or outlines under specific conditions.

For modern computers the processing power needed for most anti-aliasing in 2d images is neglegible, and so you will most often simply want to leave it on when the option is presented to you. But there are a few cases in which it may not be desireable.

  • When using selection tools. You may only wish to select an "exact" color range; in which case you do not want your selection tool to accidentally capture colors that are "almost" like what you are selecting.
  • If you intend on using fill or "paint bucket" tools that seek edges to fill an area with a color. Anti-aliasing will often make these tools stop short of filling the area because they stop at the first sign of a different shade then the one you clicked on (some programs have "tolerance" settings that may alleviate this).
  • Comic line art. This will probably make use of both of these conditions.

One final note: the phrase "anti-aliasing" does not necesarily have to refer to the edges of 2 dimensional objects. It can refer to any jagged pattern of values in a list or array. So it may also apply to textures with highly contrasting pixels or shadows in a 3d renderer.

Anti-Aliasing Techniques

Applying anti-aliasing will differ depending on what program and format you are utilizing. That said there are two main ways in which you can apply anti-aliasing to a graphical image; via in-program settings or artificially by resizing or by plug-ins.

There isn't much that can be said here about applying AA through an individual program since it will differ between programs. For instance within Adobe Photoshop, if you were working with text, you would choose whether or not to apply AA via a drop down menu within the tool specific options at the top of the screen while the text tool is selected.

Using one of the options within the menu shown here (that is not "None") will produce text akin to what you seen in the example at the top of the page.

Another way of achieving a similar effect when working with any kind of graphic is to simply make the image smaller. Depending on what kind of scaling algorithms your graphics software has available it will probably add natural anti-aliasing.

This will occure because, for example, if you have 2 pixels of 2 different colors, and you downsize those two pixels into 1 pixels, then the software will probably use the average color values of the two to create the single remaining pixel.

Here is a visual example of what we're talking about.

The first image is a blown up 20 by 20 pixel image of a simple circular shape. Notice how it does not show any signs of anti-aliasing. The edges are clear and defined and the colors to not "fade" into one another.

The second image is of a similar shape but one where the edges will appear slightly smoother when looked at in a normal zoom level. You might also notice that this image has fewer overall pixels for both the width and the height. This is because while the first image was 20 by 20 pixels this image is only 15 by 15 pixels.

So here we have been able to induce a form of anti-aliasing in the image by making the image smaller, but be warned, by making the image smaller we will lose possible detail in the image. Never commit to a change like this without making a backup or your file before hand.

Note: If you are using adobe photoshop then to obtain these results you will have to make sure that your image size options, shown when you select "Image > Image Size...", make use of "Bicubic" scaling and not "Nearest neighbor" scaling (which will leave sharp, aliased edges).