Situatie
Sometimes you’re working on a project that requires a high-quality Mac application icon with a transparent background. Taking a screenshot doesn’t capture transparency, and maybe you can’t find one on the web. There’s an easy way to extract a high-quality icon directly from a .app file.
Solutie
Pasi de urmat
First, using “Finder,” locate the app you’d like to extract the icon from. You will need direct access to the application’s “.app” file. If the app is located in your Applications folder, you can navigate there quickly by selecting Go > Applications from the menu bar at the top of the screen.
Here’s the secret to this technique. Each Mac .app file is actually a “package,” which is basically a folder with a special format, and it includes files that make an application work. Inside each app package, you can find resources, such as icons, that you can extract. So we’re going to peek inside an app package next.
Once you’ve located the app in Finder, right-click (or Ctrl-click) it and select “Show Package Contents.”
After that, the app package will open and you’ll see a “Contents” folder. Open it. Within “Contents,” you’ll see several folders and files. Double-click the “Resources” folder to open it.
By the way, while you’re poking around inside an application package, be sure not to move or delete any files within. It could prevent the app from running properly in the future.
Inside the “Resources” folder, you will find a file labeled “ApplicationIcon.icns.” This is a special icon file that contains several different-sized icons for the app. Double-click the “ApplicationIcon.icns” file, and it will open in Preview.
In the “Preview” app, you will notice that the ICNS file stores icons in multiple sizes. The largest one will be the first in the list (seen in the pane on the left), and it should be at least 256×256 pixels in size. Click to select it.
Once the icon you’d like to extract is selected (usually the first, largest one), click File > Export in the menu bar.
When the Export dialog pops up, enter a name for the file and decide where you’d like to save it. Then choose a file format. If you want a high-quality image with a transparent background, select “PNG” from the list. (Also, make sure the “Alpha” option is checked. This ensures that the PNG you save will have a transparent background.)
Then click “Save.”
Preview will export the icon you chose as a transparent PNG file. After that, close the Preview app, and your new icon image will be waiting where you saved it.
Leave A Comment?