Create Icons Quickly with Preview and Img2icns
I like to customize my Mac, and one of the easiest ways to do so is to change the default icons for files and folders. And there are some great tools to do this. For instance, Panic’s CandyBar 3 lets you easily swap and restore systemwide icon mods, and even comes stocked with a good variety of icon sets to get you started.
But for myself, I’m quite fond of the default folders and icons of OS X, and changing them en mass CandyBar style doesn’t appeal to me. Nevertheless, there are times when an often used file or folder could use a little facelift, and luckily this is really easy to accomplish.
First off, you’ll need an image. You can create one yourself, or jump to Google images or Flickr and grab something. I’m going to use this koala jpeg to the left (the thumbnail links to the full-sized image if you want to follow along).
Once you have your image, open it in Leopard’s Preview. New in the Preview app in Leopard is a really handy tool called ‘Instant Alpha’ which is really quick at knocking the backgrounds of images out. Choose it from the ‘Select’ dropdown menu in Preview’s toolbar (the default is Rectangular Selection). Now, click and drag on the white area around the koala (or whatever object you’ve chosen) until everything you want to knock out turns pink. Release the mouse button and hit return. Now your object is on a transparent background.
Next thing you’ll want to do is resize the image. Leopard supports 512 x 512 pixel icons, so lets go with that. Choose ‘Adjust Size…’ under ‘Tools’ in Preview’s menubar and type in 512 for width (our koala image isn’t a perfect square and the height won’t match the width, but that’s OK). After you’ve resized, save your image and you’ll have a transparent png file on your desktop (or wherever you’ve chosen as your default save folder).
Icons in OS X have the file extension .icns and are formatted differently than regular images. There are a number of ways to convert images to .icns files, but my favorite is Img2icns from Shiny Frog. Img2icns is a simple application that does exactly what it’s name implies – converts images to icons. Open the app and you’re presented with a little pane where you can drag the image you want to turn into an icon. Drag you image on to the target and you should now see a ‘koala.icns’ file on your desktop. Open it in Preview and you’ll see that Img2icns has created no less than nine icon samples of your image at different sizes.
Lastly you need to set your new icon to represent a file or folder of your choice. Highlight your file in the Finder and press Cmd + i – or choose File > Get Info from Finder’s menubar. Now select your icon file and hit Cmd + i again. Now you have info windows open for both your target file and your icon file:

Click on the small image of the icon file at the top of the info window and you should see its outline change to a light blue color. Copy it (Cmd + C or Edit > Copy). Next, select the small image of the target file (again the outline will turn light blue) and hit Paste (Cmd + V or Edit > Paste). Your new icon now represents your chosen file in the finder! And because your source image was cropped to 512 pixels, it should look great in coverflow view:

Img2icns is available from Shiny Frog software. It is freeware.
June 2nd, 2008 at 9:00 am
Excellent, this clears up many of the problems I was having using only Leopard and a few custom folder icons. Thanks!
June 4th, 2008 at 8:21 pm
Thanks Panther. Happy it helped you out.
October 13th, 2008 at 3:03 pm
hello Peter
thanks for your tutorial !
In shiny frog software (thanks so much to them also) I highly recommand Netfixer to make some capture of web page : http://www.shinyfrog.net/en/software/netfixer/
Best
Grégoire
October 13th, 2008 at 3:04 pm
hello
thanks for your tutorial !
In shiny frog software (thanks so much to them also) I highly recommand Netfixer to make some capture of web page : http://www.shinyfrog.net/en/software/netfixer/
Best
Grégoire
May 2nd, 2009 at 2:31 pm
Thank you for time to write this article. Was very helpful and creative.