Before you begin this article make sure you have read about anti-aliasing and anti-aliasing and ‘halo’ formation. And remember, anti-aliasing increases the number of colors in an image and hence the file size. It should not be applied blindly to all objects and text.
When to use anti-aliasing
Anti-aliasing should be employed for objects with curved edges such as
- Ovals and circles,
- Any text above 10 point size, so that its edges appear smooth,
- Straight lines that are not exactly vertical or horizontal.
Sponsored Links
When to avoid anti-aliasing
Small text (text below 10 point size)
Such text, if anti-aliased, appears messy. Check the images below
24 color Gif image with anti-aliased text: 1350 bytes
2 color Gif image with anti-aliased text: 280 bytes
Note the difference in file size.
Straight lines
Especially, those that are exactly vertical or horizontal. There is no need to anti-alias such lines. The same is true for objects that contain straight vertical and horizontal lines such as squares and rectangles.
12 color Gif image: 291 bytes
Anti-aliased rectangle
2 color Gif image: 218 bytes
Rectangle without anti-aliased lines
The case of the rounded-rectangle
Rounded rectangles have curved edges. It follows from what we have discussed so far, that since the edges are curved, we should use anti-aliasing on the figure. Actually, the decision whether to implement anti-aliasing or not depends on the amount of curvature and the final look of the image you want. I would not like to pass any judgements, but leave the choice to you.
16 color gif: 373 bytes
Rounded rectangle with anti-aliased edges
3 color gif: 315 bytes
Rounded rectangle with non anti-aliased edges