Extract and Copy an Application’s Icon


Need to get a copy of an application’s icon on Mac OS X? Turns out there’s a really easy way to do it in Leopard and later releases.

Let's Begin:

The icons that represent an application on Mac OS X are buried down inside the application package within a folder called Resources.  The icon, in a variety of different sizes, is contained within a file called App.icns. Once you know where they are, it’s not hard to get at them, however there is a much easier way to extract  the icon for an application and make a copy of the image. Here’s how:

Step 1: In Finder, navigate to the application who’s icon you want to get.

Step 2: Select the application and copy it with Edit > Copy (or use the command-C keyboard shortcut).

Step 3: Launch the Preview application and select File > New from Clipboard (command-N).

What you will get is a Preview window showing application’s icons in all their various sizes. For example, performing these steps on iTunes results in this in Preview:

Preview window showing the iTunes application icons

As you can see, iTunes (and most applications) have five different sizes of their icon to help keep the icons looking their best regardless of what size needs to be displayed. If you want to use the app’s icon somewhere else, just select the size you want and choose File > Save As.  Select the PNG format if you want to preserve the transparency found in most icons.  If you don’t care about the transparency, then JPG is probably the way to go.

Why does this work? When you copy something to the clipboard, the various components of the object being copied are stored as separate elements. In this case, Finder places the application executable code and its icons in separate elements. When you paste into Preview (via the New from Clipboard command), Preview selects the elements from the clipboard that it understands what to do with which is the images of the icons and this is what it displays. Preview simply ignores the other elements in the clipboard (e.g., the application’s executable code) that it doesn’t know what to do with. This trick will work on both Leopard and Snow Leopard.

Category: Apple Mac OS X