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.

System Icon Viewer source

Category: Carbon, Cocoa, Downloads, Icons, Programming 7 comments »

7 Responses to “System Icon Viewer”

  1. Jesper

    Link’s dead.

  2. mr_noodle

    Sorry. Just learning WordPress. Should be working now.

  3. Peter Hosey

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

  4. mr_noodle

    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.

  5. Vincent Gable

    Thanks for making this available, it has really helped me find the right icons to use.

  6. Chardish

    Thanks for this! As a new Cocoa developer, this is very handy for me.

  7. jils

    This is a great tool for Mac devs. Thanks for making it available.


Leave a Reply



Back to top