O'Reilly logo

Learning Cocoa by Apple Computer Inc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required