Jun 282011
 

Choosing the right collection of stock icons was not a quick job. But you’ve made the choice, and bought yourself a perfect set to use in your application. Now when you bought the images, how are you going to integrate them with your project? Do you know what file format should be used where, and what size, color depth or image style to use in your development environment for your application?
There are several typical questions asked by developers. Where should I use 32-bit icons with alpha-channel, and why pick them over traditional 256-color images? What development environment support translucent graphics, and what file formats should be used? Finally, which formats to use for the many Windows control elements? Let’s clear these questions one by one.

Stock icon files for development

Picking 32-bit icons over their 256-color counterparts is easy. 32-bit icons feature an extra layer defining a translucency mask. The layer is called alpha channel. Thanks to that alpha channel, icons with 32-bit color depth can blend nicely with backgrounds of any color and complexity, having smooth edges and looking great even if your background has a busy color, gradient, or has an image or pattern. In addition, the alpha channel makes shadows and reflections appear translucent, making them appear natural and overall rendering extremely realistic.
So, 32-bit icons are just the right type to use. The real question is whether you can use them for your project. In reality, 32-bit graphics can be used in a handful of situations – and cannot be used in others. If you’re making a Web site, the chances are that your target audience already has a compatible browser installed that can display 32-bit graphics with full alpha-channel support. Exceptions are far and between, and include Internet Explorer 6 and earlier versions, ancient builds of Mozilla, and a few resource-stranded mobile browsers (although most mobile platforms can still render 32-bit images).

For a Web site, you would use 32-bit icons in PNG format wherever possible. If maintaining support for legacy browsers is essential, you can resort to 24-bit PNG icons, converting the original 32-bit images with an icon editing tool such as IconLover. 8-bit GIF files can be used for designing light Web sites to be used with the slowest mobile platforms. Note that GIF files don’t have a full alpha-channel support; instead, they offer a single-bit transparency mask. Again, you can render your 8-bit images from 32-bit originals with IconLover, or use pre-rendered icons supplied with your stock icon collection. The GIF icons provided with your set will display nicely on most types of backgrounds, but you can produce your own versions if you have a busy or colourful background and want your icons blend with it.

Windows programs can normally only use one particular type of file depending on which control you’re going to use it for. For example, ICO files can be used for application icons. ICO files include the same image (or, rarely, different images) in a number of sizes and color depths within a single file. Windows will automatically choose the right size and color depth depending on the user’s display settings and the location of the icon. It’s best to assemble all standard sizes and color resolutions in an ICO file. Our stock icons already include all standard resolutions and color depths stored in the ICO format; if you want to build your own ICO files, you can use IconLover.

There are dozens of other things we’d love to tell you about integrating your newly purchased stock images. You can access a full version of this article covering the many Windows controls and development environments such as Java, C#, .NET and Visual Studio, at http://www.aha-soft.com/faq/integrating-icons-development-environments.htm. You can always find perfect icons for your programs or Web sites at www.aha-soft.com.