OS X: Convert Any Application Icon to 512 x 512 Image File

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 whatever Photoshop.

OS X: Convert Any ICNS Icon to 512 x 512 Image File

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.

OS X: Convert Any ICNS Icon to 512 x 512 Image File

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.

OS X: Convert Any ICNS Icon to 512 x 512 Image File

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

OS X: Convert Any ICNS Icon to 512 x 512 Image File

Done

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.

OS X: Convert Any ICNS Icon to 512 x 512 Image File

Your Options:

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.

Related Posts:

  1. How to get your Applications Folder in your Dock - Mac OS X
  2. Found Freeware: Dock Dividers (OS X)
  3. How to Display Memory Usage in a Dock Icon - Mac OS X
  4. How to set the default program to open a certain type of file in Mac OS X
  5. Workflow: OS X 10.5.2 Fixes Stacks!!!
  6. New Mac user Starter Kit

This entry was posted on Thursday, July 10th, 2008 at 4:42 pm and is filed under OS X. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Stumble It
Add to Del.icio.us

Did you like this post?

Digging and sharing is a great way to say thanks!

17 Responses to “OS X: Convert Any Application Icon to 512 x 512 Image File”

  1. And, quite simpler, just open the .icns file with any appropriate software (like the one include on Mac OS X, “Aperçu” in french, same in english ?), click on “Save as”, and then select the wanted output format…
    No need of the terminal, 10 seconds manipulation, and the best results : you can even choose which version of the .icns file you wanna export (i.e. the 12×12px version, or 256×256, etc.) !

  2. Note, i’m using Mac OS X 10.5.2, maybe that’s the trick?

  3. YES! I was searching furiously for a way to do this a few weeks ago for a project and ended up having to just search google for the icon. I wish I would have known about this earlier! :)

  4. You could also drag and drop the application on Acorn (with the cmd-option keys down), and it’ll open up a little image browser for the app. Find the icon, double click on it and do a web export to your favorite format.

    Here’s a little movie: http://gusmueller.com/stuff/Aperture2Acorn.mov

    You could also use Preview to do the same thing (after opening up the app package and finding the icon).

    Disclaimer: I wrote Acorn, so I’m obviously biased :)

  5. Great tip! thank you! :)

  6. Great tip! Thanks!!

  7. There is a little free program for doing the same thing: IconGrabber.
    No need to use Terminal, but of course this is a helpful option!
    Thanks!

  8. I think you can use ~/Desktop/… instead of /Users/username/… in the terminal. I can’t check on a Mac right now, but on most Unix-based operating systems, “~” can be used as a synonym for the current user’s home directory.

  9. this is a cluttered approach. there is an easier way. and i mean _easy_ way:
    1. locate the icon you want
    2. right click > Get Info ( or apple + i )
    3. click on the icon in top left corner and copy it ( apple + c )
    4. open Preview and File > New From Clipboard ( or apple + n )
    5. choose the size you want and File > Save as… and pick PNG with alpha

    that’s it :P works on 10.5.4, and i assume on older ones too :P

  10. It’s amazing how nobody read previous comments when posting one :p

    Maybe it’s because i said “aperçu” instead of “preview” for the app :p

  11. This is a great tip! No more trawling Google images. Horray!

    Nice one!

  12. wtf!

    I think most of you needs to learn your mac osx “abc”.. preview app, which have followed OS X since its birth, can do this as well and in same resolution and tranparency etc.

    Its alot worse the other way around, making a icns, which oddly isn’t supported.

  13. WOW,

    I had no idea that Preview could do this.
    Thanks for all the tips everyone :)

    ~Bitt

  14. can this be done in windows too?

  15. Y would you be using windows? and do this with 10.5.4 on the mac.

  16. You can also use Candybar (http://www.panic.com/candybar) to store these icons and export into Photoshop. Just drag the icns file into the candybar window and its now ready to be archived.

  17. Fernando Said...

    Great tip! Thanks!

LEAVE A COMMENT




Message: