System Icon Viewer
When I saw this post, I mentioned to Daniel Jalkut that I had done the same thing that he did (which was to create an NSImage category to access Carbon’s Icon Manager’s icons). After his obligatory insistence that I start a blog, I sent him a little program I had thrown together to preview the icons.
Since he referenced it in his post, I’ve made it available. It’s not pretty as it was just slapped together but it’s functional. It does show that if you are using Cocoa, the category is pretty much unnecessary as NSWorkspace seems to return the same icons, with a few exceptions. Of course, if the icon you want is one of those exceptions, you can look and decide for yourself.
Category: Carbon, Cocoa, Downloads, Icons, Programming 7 comments »
September 10th, 2006 at 11:42 am
Link’s dead.
September 10th, 2006 at 12:46 pm
Sorry. Just learning WordPress. Should be working now.
October 17th, 2006 at 5:58 pm
Very nice. There is one bug: The icon size between 128 and 32 is 48, not 64; that’s why the icon is clipped in the 64-pt Carbon image well (it uses the next larger rep, which is 128, and you told it not to scale, so it clips).
Also, I wrote a similar app called IconGrabber. I was still learning Cocoa at the time, and hadn’t yet found out that iconForFileType: could do HFS types; it uses GetIconRef for type/creator combinations. You can supply a creator, or leave it blank to use kSystemIconsCreator. It also supports NSImage names, filename extensions (iconForFileType: again), and MIME types, as well as various icon transformations (e.g. disabled, selected, scaling). And you can save any icon as a TIFF file.
Mine doesn’t have any reusable categories, though, so yours has the advantage there. 🙂
October 19th, 2006 at 10:49 am
Ah, that explains the clipping on the Carbon end though it seems that NSImage is able to wrangle up a 64×64 version. But thanks for the heads up.
Interesting tool. I think one of the major points of this discussion is that the category is mostly unnecessary plus mine is not really a maintained tool so I wouldn’t worry if I were you.
September 10th, 2007 at 10:55 am
Thanks for making this available, it has really helped me find the right icons to use.
April 3rd, 2008 at 3:03 pm
Thanks for this! As a new Cocoa developer, this is very handy for me.
November 12th, 2008 at 12:47 pm
This is a great tool for Mac devs. Thanks for making it available.