OS X: Convert Any Application Icon to 512 x 512 Image File
by Jay Hilgert
on July 10, 2008
If our freebies have benefited you personally or have helped you earn a profit please consider donating via paypal.
This might be a tip that is more useful for bloggers or tech writers than designers, but I’ve found myself in this situation plenty of times. I need an application icon to use as an image for one reason or another, I can’t find a decent one online, and all of the crappy conversion shareware software is just wasting my time. I came across a very neat trick over at Macosxhints that was super simple and no 3rd party software is required. If you have OS X you can use the Terminal App (Applications > Utilities) to convert any ICNS file to an image format that can be used in
1. Locate Your Icon
Now I mentioned that this tip was for Application Icons, but it will simply work with any ICNS file on your Mac. The first thing you need to do is locate the ICNS file you want to convert. I recommend copying it to the Desktop, not only because it’s easy to see but we’re going to use a file path, and the Desktop is a relatively short path to type.
If you want to convert an “Application” icon, like I am, the quickest way (If the app is in your dock) is to Command + Click on the icon in your dock to bring it up in Finder. Otherwise, navigate to your Applications folder and select an application. Then Control + Click on the App itself and select “Show Package Contents.” I’m going to be using Aperture as an example.
Now you will see (in Finder) all of the files that essentially “make up” your application. Navigate to Contents > Resources. This is where all of the image files for your app are located. You will need to find a file named “Appicon.icns” or sometimes its simply the name-of-the-app.icns, (ex: Terminal.icns). I’m pretty sure the Photoshop Icon is called “PS_AppIcon.icns,” so depending on who made the software, you might have to do some searching to find the icon you’re looking for.
2. Copy Your Icon to the Desktop
You can ignore this step if you like typing really long file paths, but I recommend at least making a copy of the icon. You don’t want to ‘move’ it from the resources folder, just hold option and drag it to the desktop to make a copy, or simply copy and paste.
3. Covert Using Terminal.app
Now that you have your ICNS file on the Desktop, open Terminal.app (Applications > Utilities). Paste the code below into the Terminal window, change your username and file names, then hit enter to convert. That’s it. (assuming you did have your file on the Desktop)
sips -s format png /Users/yourusername/Desktop/Appicon.icns --out /Users/yourusername/Desktop/Aperture.png
As you can see, we have a nice, big png (512 x 512px) as a result, complete with transparency. Now remember that the quality of your end result depends on who developed your software. If they didn’t follow Apple’s guidelines and only shipped their software with a 256 x 256px App icon, you might not get the best results.
Now I would think that PNG would be the most useful because of the transparency but you can choose to convert to any of the following image formats: jpeg, tiff, png, gif, jp2, pict, bmp, qtif, psd, sgi, and tga. Just change “png” in the code above to whatever format you choose.