You’ll remember from the article on Transparent Gifs that “halos” are form around objects once the background color is made transparent in a gif image. Actually, these ‘halos’ appear ONLY when the object is anti-aliased. Anti-aliasing causes pixels at the edges to have varying hues of a color – Refer Anti-Aliasing.
The ‘halos’ consist of such pixels. When you make the background color transparent, the pixels that carry other hues remain in the image, leading to the ‘halo’ effect.
Sponsored Links
Preventing ‘Halo’ formation
‘Halos’ appear when a transparent image, made originally for a particular background color, is displayed on a contrasting background color. The ‘halos’ would not be discernible to the human eye if the two colors, the original color in the image which is made transparent and the color of the web page that shows in places of the original color are quite close (such as white and pale-yellow)… though the “halos” would be very much there.
There are several methods with which you can suppress halos or stop their appearance altogether.
- When creating images from scratch, do not anti-alias any objects or text. Since anti-aliasing is turned off, there won’t be any pixels of extra color or hue. Hence, halos will not appear. The downside is that text or objects will appear serrated or jagged.
- Use images on backgrounds that are very close to the original background color.
- When making graphics from scratch in an image editing program, keep the background color in a separate image layer and always save a copy of the image in the native format of the software (in order to preserve the layers).
- You can remove halos by using “feathering” techniques intelligently. “Feathering” options are available on most image editing tools.
- Programs such as Adobe ImageReady have some features through which halos can be subdued. These features would be using feathering or anti-aliasing algorithms to select and remove halos.