Add an Application Icon

The developer tools package on Mac OS X contains a very simple utility called Icon Composer that converts images into Mac OS X-style icon files. Using a standard graphics application, you can create art for your icon, save it as a 32-bit image in TIFF, PICT, or Photoshop format, then import it into Icon Composer. Once the image has been imported, Icon Composer can create icon masks for icon sizes that require one. Icon Composer saves files in the icns format used by Mac OS X to store icon families. The Aqua Human Interface Guidelines document (http://developer.apple.com/techpubs/macosx) provides essential information about creating icons for Mac OS X.

For those comfortable working with Adobe Photoshop, this section explains how to use that application to create source art for an icon in just a few seconds. If you aren’t familiar with Photoshop, you can use the ToDo.tiff file included with the sample files, and skip the first four following steps:

  1. Launch Photoshop and make a new a 128 × 128 pixel image with a transparent background.

  2. Draw or copy/paste your art into the document.

  3. Create a new image channel using the Channels tab. This new channel will function as an alpha mask. Paint the areas of the mask that you wish to be transparent in the Finder and in the Dock.

  4. Save the file as a TIFF image. This is the recommended format for image files used in Cocoa.

  5. Launch the Icon Composer application in /Developer/Applications.

  6. Choose Import Image from the ...

Get Learning Cocoa now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.