I needed to create an ICNS file from a folder that had a custom icon. I looked through the Apple Developer utilities, but I couldn't find anything that would allow me to extract the icon. In the pre OS X days, you copied the icon using the Get Info item. You can still do this is OS X, but when you paste this into Icon Composer (Developer Tools), you get a lousy little scaled icon. Bummer.
However, when you paste it into another file's Get Info window, you get a nice 128x128 icon, looking suspiciously like an ICNS. Hmmm. The old memory tweaked and I rememberd that when you copy in OS X, you get several versions of whatever you copy (e.g. formatted text will get RTF and plain text). So there must be an ICNS copy in there, but how to extract it? Enter an application I thought was useless -- Clipboard Viewer, which you'll find in /Developer » Applications » Utilities » Built Examples. Clipboard Viewer not only lets you see the clipboard content, but also the type, and it lets you save ... so ...
You copy the icon in the Get Info window, open Clipboard Viewer, select the icns clipboard entry, and then click Save Data. Give the file a name ending in .icns, and you're done. I hope this hint is helpful and not to obvious.
[robg adds: This older hint explained another way to get all versions of an icon file.]
However, when you paste it into another file's Get Info window, you get a nice 128x128 icon, looking suspiciously like an ICNS. Hmmm. The old memory tweaked and I rememberd that when you copy in OS X, you get several versions of whatever you copy (e.g. formatted text will get RTF and plain text). So there must be an ICNS copy in there, but how to extract it? Enter an application I thought was useless -- Clipboard Viewer, which you'll find in /Developer » Applications » Utilities » Built Examples. Clipboard Viewer not only lets you see the clipboard content, but also the type, and it lets you save ... so ...
You copy the icon in the Get Info window, open Clipboard Viewer, select the icns clipboard entry, and then click Save Data. Give the file a name ending in .icns, and you're done. I hope this hint is helpful and not to obvious.
[robg adds: This older hint explained another way to get all versions of an icon file.]
•
[62,196 views]

