Source

IconGrabber /

Filename Size Date modified Message
English.lproj
IconGrabber.xcode
101 B
99 B
280 B
643 B
1.8 KB
13.6 KB
153 B
779 B
1.4 KB
4.3 KB
270 B
458 B
IconGrabber 2.0

concept
=======

an application that wraps the Icon Services and NSImage APIs, allowing you to retrieve an icon by type and creator, name, filename extension, or MIME type, apply various transformations to it, and then look at in an image well and optionally save or copy it.

usage
=====

first you must specify a criterion by which to look up the icon. there are four:

* type and creator
	you can use any of the file type constants in HIServices/Icons.h (in which case the creator field should be either left blank or set to 'kSystemIconsCreator' or 'macs'), or any valid type and creator (for example, GIFf/prvw will show you Preview's icon for a GIF file).
* name
	any name that NSImage's +imageNamed: method will accept will work. this means any TIFF image in /System/Library/AppKit.framework/Resources, minus the filename extension.
* extension
	any filename extension. you can give as many leading periods (zero or more) as you like; they will be stripped off for the look-up.
* MIME type
	you can find a central repository of these (used by Apache web server) in /etc/httpd/mime.types; you can also look inside applications' Icon.plist files using a text editor or Property List Editor to see what MIME types they support.

on Jaguar, extension and MIME-type look-up are not available, therefore you can only look up icons by type/creator or name.

three of those criteria are looked up through Icon Services (name lookups aren't available in Icon Services; they're done with NSImage). for these criteria, you can specify transformations to apply to the image:

* transform
	'Disabled' makes it look like a disabled control. 'Offline' is what used to happen to a disk when you unmounted it without ejecting it (now, as of Panther, it has no effect). 'Open' is what used to happen to an application when you opened it (now, as of Panther, it makes the icon disappear!).
* selected
	darkens the image, like when you select it in the Finder.
* width/height
	scales the image to this size. usually, several source images are available, and the system libraries pick the closest one for fidelity.
* label
	a colour with which to tint the image. this can be 'None', 'Custom' (use the colour in the colour well to the left of the pop-up), or any of the seven predefined label colours.

when all is set up, click 'Draw'. IconGrabber will summon the icon and render it in the image well. if no icon was found, Icon Services returns a document icon whereas NSImage returns no image.

you can resize the window to adjust the size of the image well and some of the fields and pop-ups; it will never, however, be displayed at a larger size than you specified in the width and height fields.

version history
===============
2.0
---
* changed version to 2.0 from 2.0b1.
* added Get Info version for English users.

there were no code changes in 2.0. the only reason for the beta was to prove that everything (including auto-disabling of extension and MIME type) works on Jaguar.

2.0b1
-----
* added ability to get icons by name, using AppKit's +[NSImage imageNamed:] method.
* added ability to get icons by MIME type or pathname extension, using Icon Services' GetIconRefFromTypeInfo. automatically disabled on OS X < 10.3.
* fixed memory leak of IconRefs in 1.0.
* separated IconRef->NSImage code from the get-by-type-and-creator code (since the get-by-MIME-type and get-by-extension methods use it too).
* separated Size field into Width and Height fields. it is now possible to scale the icon so that it is not square.
* fixed bug wherein the steppers ignored the value in their respective fields, so that if you changed the value in the field, then operated the stepper, the stepper would go to the next or previous step from the old size value.
* the IconGrabber window is now centered on startup, and remembers its position and size for future startups.
* added tool-tips.

1.0
---
initial release.

future expansion
----------------
* provide an option to open a file to get its icon or to read an image from it.
* provide a command to open any bundle, and extend the by-name look-up to search in those bundles. alternatively, allow the user to specify a single secondary bundle in which to look for images.
* allow drag-and-drop onto the type and creator fields.

contact; date
=============

http://boredzo.fourx.org/icongrabber/

this software was released on 2004-11-23.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.