How Can I Extract And Convert Windows Icons For Free?

|

Have you ever wanted to develop a website that had some distinctly Windows characteristics to it? Have you ever wondered how you could get those nifty Explorer icons into a format you could use? Well, if you search on Google you’ll find plenty of tools that can do it all for you in one shot. However, they are all commercial or shareware applications. So how can you accomplish this for free?

Well, there are two steps to this process and it’s not exactly as user-friendly as the commercial applications will be. You can’t knock it for the price, though.

Extraction

The first thing we need to do is extract the icon or .ICO file out of the DLL or EXE that it happens to be embedded in. I found a very simple and FREE application that can do this called IconsExtract.

IconsExtract ScreenshotWhen you run the program you’ll be prompted to enter the file in which to look for icons. The default file is C:\WINDOWS\system32\shell32.dll which you can test first. Click the Search For Icons button and you will see all of the familiar Windows icons. Just click the one you want and choose the Save Selected Icons menu option. You can select where to extract the icon and that’s it for the first step.

Conversion

The next thing we need is to get this icon into a format that we can use on a website. This would be a gif, jpeg or png image usually. The software package I found that can accomplish this task (for FREE) is the ImageMagick library. If you’ve heard of this software it has probably been in reference to a prerequisite for another program. Many applications use this library as the foundation for image processing because it is so good. However, if you go to the site and download the Windows binaries which is a Windows installer you will see that there is more to this library than a few DLLs. That’s right, there are some executables in there! They are command line utilities and one of them is aptly named convert.exe.

In my case the icon I had extracted was 16×16 pixels and the images I was working with were all 20×20 pixels. Not only did I need to convert my icon, but I needed it resized as well. You won’t believe how simple the syntax is to accomplish this. Open up a command prompt in the directory where your icon file is. The ImageMagick setup program should have placed it’s bin directory into your path so Windows knows where to find convert.exe. So the command looks like this:
> convert.exe folder.ico -resize 20x20 folder.png

Conclusion

That’s all there was to it! Not too bad for completely free applications. The convert.exe program actually does a lot more. If you look at the help you’ll see that it is quite extensive in it’s abilities. The next time you pull out your credit card because you think that shareware program is the only way, think twice. There just may be a free alternative.