Creating Photorealistic Icons for Mac OS X
Pages: 1, 2, 3
Enough tips, let's build one
Remember that this piece is about photorealism. Apple suggests that you don't begin with a picture because you have little control over tiny details like lighting and shading, and they are right.
However, if your strengths aren't in illustrating and you want that photorealistic look, then by all means use a photo. Here I will show you how to get the most out of a photo-based image. You may have different tools, but the process is similar in many different applications. Work with what you have. If you have questions, post them in the Talk Back section at the end of the article.
Step 1. First, locate the image you wish to use. You really need to start out with a 32-bit image, larger than 128 x 128. The reason for this is you may be performing some editing with your image and you don't want to be left with something that is 64 x 64. In image editing, the rule of thumb is that you can always scale down, but you never scale larger than the original size of your image (you will lose quality).
In this case, I selected the image of a compass for my imaginary application. Since this photo came from stock but doesn't have an Alpha channel (invisible layer), I need to get rid of the background. Depending on your image, you may need to use a combination of the magic wand and the lasso tools.
In Photoshop, I use the magic wand (and the Shift key) to select the background elements. I then use the Select Inverse command. This quickly gives me a marquis only around the compass. I cut/copy the compass out of the image and then paste it into a new document with a transparent background. You could scale the image here, save it as a Photoshop file, and go right to building the icon. I think this is a mistake. There are other issues to consider and a vector-based program is faster to work with than Photoshop.
Step 2. I save the image (with the transparent layer) as a Photoshop file, disregarding the size (I will scale it in LiveMotion).
Step 3. I place the Photoshop compass image into LiveMotion. Since the compass image is huge, my first job is to take the image and with the Shift key (to preserve proportions) scale it down so that the largest size (height or width) is just under 128 pixels. I could force the compass to be 128 x 128, but by making an image conform to size and ignoring proportions, I would end up with a compass that looked like a penny on a railroad track. After evenly scaling, I then draw a 128 x 128 pixel colored box next to the compass image. This box will work as my size/color guideline to ensure I match all the requirements of OS X.
Now this next step may seem unnecessary to many, but I have found that it is the only way to ensure I really get what I want before I build my final icon file.
Step 4. I take my compass image and proportionately scale it to fit inside my box. By changing the color of the box (simple to do) to a wide variety of colors and hues, I can see which colors will work well with my image and which colors won't. Now I can edit my image so that it will work in many color schemes. If the edge of your image is busy (anti-aliasing doesn't work well) against one of the test colors, you can use your editing tools to soften it. I do not mean blur the whole image, just soften the edge.
Step 5. Once I am satisfied with my image, I align and group the box with the icon (to preserve/ensure the 128 x 128 pixel dimensions), and I set the colored box to an opacity setting of zero. Then I export the image as a Photoshop file.
Step 6. Here is the easiest step. I open the Apple developer application, Icon Composer. I see a series of boxes for Thumbnail, Huge, Large, and Small. I also find two columns, one for RGB (32 bit) and the other Hit Mask (1 bit).
Starting at the bottom, I double click the left-hand box, Thumbnail (128 x 128 pixels). It asks me to locate the file I wish to use. I locate the compass Photoshop file I created in LiveMotion and select it. It magically appears in the Thumbnail box. Now I repeat the same step for the Huge (48 x 48) window, but there is a little twist here. This time when I double click, I select the same file but my file is larger than 48 x 48. It asks me if I want to have it scale down the image and if I want it to create the 1-bit mask (the mask is an invisible layer that tells the computer which parts of the icon are clickable). I agree to both. After repeating this step with all the 32-bit boxes, we have only one step left to complete.
Step 7. Save the file. Remember that the name you choose for your icon(s) will be what your application will look for in its resource folder, so be sure to double check. When I save the file in the Icon Composer, it is automatically saved as an .icns file. I'm done.
Total time: 10 minutes
In future articles, I'll tackle the development of all types of icons. In the meantime, I hope you have the opportunity to play with Icon Composer and produce some stunning graphics!
Alan Graham is the creator of the Best of Blogs book series and is a frequent writer on the O'Reilly Network.
Return to the Mac DevCenter.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 31 of 31.
-
About Icons shadows...
2007-03-29 23:45:34 Macnewbie [Reply | View]
There's something that i don't understand completely, the author says : "What Apple recommends is that the position of your lighting (the imaginary light souce striking your object) be up and to the left of the object(s) in the icon", but apple in its HIG, in the icons's section says : "All Aqua interface elements have a common light source from directly above, not from the upper-left corner as in Mac OS 9 and earlier". Then, where the light source is coming from ?, from upper-left corner or from above of the object(s) ?. Can someone to clarify this one for me, please ?. Thanks in advance
-
About of shadows...
2007-03-29 23:42:52 Macnewbie [Reply | View]
There's something that i don't understand completely, the author says : "What Apple recommends is that the position of your lighting (the imaginary light souce striking your object) be up and to the left of the object(s) in the icon", but apple in its HIG, in the icons's section says : "All Aqua interface elements have a common light source from directly above, not from the upper-left corner as in Mac OS 9 and earlier". Then, where the light source is coming from ?, from upper-left corner or from above of the object(s) ?. Can someone to clarify this one for me, please ?. Thanks in advance.
-
About of shadows...
2007-03-29 23:42:19 Macnewbie [Reply | View]
There's something that i don't understand completely good, the author says : "What Apple recommends is that the position of your lighting (the imaginary light souce striking your object) be up and to the left of the object(s) in the icon", but apple in its HIG, in the icons's section says : "All Aqua interface elements have a common light source from directly above, not from the upper-left corner as in Mac OS 9 and earlier". Then, where the light source is coming from ?, from upper-left corner or from above of the object(s) ?. Can someone to clarify this one for me, please ?. Thanks in advance.
-
Iconbar differs
2006-11-06 09:35:50 nigelibrown [Reply | View]
I created my Icon as 128x128 and the application now has the replaced .icn file and looks great! However the Iconbar icon still looks like a standard application?
-
Where can I get Icon Composer?
2006-02-15 07:22:59 ghiberti [Reply | View]
Hi, can't wait to get started. Where can I get Icon Composer or a comprable program?
-
where IS project builder?
2006-01-19 09:46:10 turdball [Reply | View]
i have Xcode and i have icon composer, so i assume that i would have project builder, but i cant find it. when i open Xcode and try to follow along with the steps mentioned, i get lost. they are two different programs, no?
-
Switching Application Icons
2004-07-21 20:30:44 Taino [Reply | View]
After reading your hack I created a nice looking icon that I intended to use as a replacement for my scanner icon. Question: Let's say I want to replace an icon from a store-bought application with a custom designed icon. Is it possible to change an applications icon? If so how?
Can you recommend any books that might contain this kind of hack. I am waiting on OSX Power Tools.
I am using OSX 10.2.8
Thanx
-
why isn't my icns file an icon?
2004-05-23 23:43:30 mamaglee [Reply | View]
It took me about 3 minutes to make my first experimental test icon using photoshop and Icon Computer, however when I saved it in Icon Composer as an .icns file, the files doesn't show the icon. It shows up as an image with the right corner folded down and the letters ICNS on it below a generic picture. I thought the icon would BE an icon. So how do I get it to be an icon for it's own file? I got info and same thing.
Thanks, Mamaglee -
why isn't my icns file an icon?
2004-06-06 07:52:29 TriangleJuice [Reply | View]
Go to VersionTracker and download the following handy app: Icns2Rsrc. This app will visualize your icon. Then you can use the Copy-Paste method via the Info menu of a file or folder.
The icns file is meant to be implemented in an XCode or other programming environment...
Have fun making icons!
-
need help on project builder step in icon process
2003-10-06 07:47:19 anonymous2 [Reply | View]
im a graphic designer, and am very interested in making some custom icons. i've searched all over the web, ive tryed making applications just to get an icon to show up, to avail.
Is there a way to create an .incs file and apply it only to a folder?
im not really interested in making it my default icon for an application, more of a custom icon people could use on a copy paste basis for a folder.
If not whats the simplest program i could create in order to get my .incs file to show up as an icon?
apppreciate any help, or links to it..
thanks.
-
need help on project builder step in icon process
2003-10-16 10:37:13 anonymous2 [Reply | View]
I too am trying to create a new icon for a folder. I have used the "get info" option and pasted in the psd file over the folder icon but that just renders a white square with the icon in the middle. *shrug*
sorry for the rookie question -
need help on project builder step in icon process
2003-11-06 09:01:29 anonymous2 [Reply | View]
Open your Folder's "Get Info", open your icon. Select the Icon and "Copy" it onto the clipboard. Select the icon in the folder's info panel, then use the "Edit->Paste" menu.
voila
-
need help on project builder step in icon process
2003-11-06 09:02:31 anonymous2 [Reply | View]
Sorry, I forgot that it must be a icns file, so setup your icon in Icon Composer and then copy it from there, not from the original PSD.
-
need help on project builder step in icon process
2004-01-20 11:11:54 anonymous2 [Reply | View]
How do you copy from Icon Composer? My copy/cut/paste are grayed out. Thanks.
-
Icon Composer facility
2003-08-29 06:21:47 anonymous2 [Reply | View]
After importing the 128x128 thumbnail in Icon Composer, you can generate the Huge, Large and Small images simply drag-dropping them from the 128x128 one.
SB from Rome
-
Icon Builder
2003-08-05 11:23:10 anonymous2 [Reply | View]
There is another application that I use to create Mac OS X icons called Icon Builder. You can get it at www.iconfactory.com It is a plugin for Photoshop and works with Photoshop's layers. It has a lot of features including making icons for Windows XP. Price is $69.
Other good sites for getting icons are:
www.xicons.com
www.mixthepix.com
www.rad-e8.com
-
So now what??
2003-05-02 20:49:38 anonymous2 [Reply | View]
OK, so I've created an "ICNS" file. Big deal. Now how do I get my icon onto whatever icon I want to change? -
So now what??
2003-06-26 11:09:28 anonymous2 [Reply | View]
I assume your going to put it in a project built in Project Builder. If you want it to be the default icon add the icon to your project (Project->Add Files) Then click Target on the horizontal Tab. then click on Application Icon. Next, under Icon File type in your ICNS name.
If you want to display your ICNS file in Interface Builder, use the thing that looks like a picture of a mountain. Sorry to be vauge, but you didn't say what your trying.
-
icon composer
2003-02-04 13:49:43 anonymous2 [Reply | View]
I'm just curious on how to get the application, icon composer.If anyone can lead me the way, that would rock!
thanks!
-
my icon wont stick, too
2002-09-23 09:18:20 turbo1 [Reply | View]
i have the same problem. icon doesnt stick. have tried it over and over with both iconbuilder pro and icon composer... btw, i am using osx the last version before jaguar, until it comes.. but have also tried using iconbuilder pro in os 9.2 but with the same results when trying for the 128 bit icon. would appreciate a solution..
-
Icon won't stick
2002-06-11 14:56:42 vineetb [Reply | View]
any resolution to the above problem?
i am also facing this problem for some of my icons mainly hard disk.
-
Thumbnail trapped in a square
2001-09-10 19:26:53 brianleahy [Reply | View]
For some reason, Icon Composer won't import my actual Photoshop file at all. It allows me to select the file, but never actually imports it.
I tried saving the file as a TIFF, but when I import the TIFF document into icon composer, the sections which were transparent in Photoshop have become white. The image floats inside a white box, not at all what I wanted.
I am using Photoshop LE 5.5 I REALLY hope that isn't the entire cause of the problem. :-( Any suggestions?? -
Icon composer bug??
2001-09-11 04:34:53 brianleahy [Reply | View]
I solved my problem - and I think that, in the process, I found a bug in icon composer.
I used IC to import my Photoshop file, and as before, nothing appeared to happen. But on a hunch, I saved the icon file, exited IC, and then reloaded the icon file. Voila! My icon was there, and properly masked, too. Apparently, there was some kind of problem that prevented the image from being displayed after it was originally loaded. Weird.
-
Icon won't stick
2001-05-25 21:19:00 mblaster [Reply | View]
I've followed Apples directions, but my custom Icon keeps changing back to aa generic Application icon seemingly at random.
Any advise? -
Icon won't stick
2001-05-28 14:52:38 Alan Graham |
[Reply | View]
Can you email me with a little more detail? You can reach me at alang@oreilly.com. I'll be glad to help.
Alan






thanks, G