Important commands: sips
A few folks have asked me where I got the nice looking Software Update icon for my post regarding Apple's Security Update 2007-004. First, let me say, "Thanks for noticing!" Second, let me point out that Steve Jobs will probably be knocking on the door of the SlaptiShack wanting some sort of money. Let's hope he takes SlaptiBucks.
Finding the icon file was the most difficult part of the task. As you know, Mac OS X applications are actually directories. Inside the .app directory, you'll find a Contents/Resources
directory. In that directory, should be an image file with a .icns extension. This is the icon file. In Terminal, copy that file to somewhere useful (~/Desktop
comes to mind).
Here's the command line I ran to convert the Help Viewer icon to PNG for this article. As always, the '$' represents a shell prompt and should not be typed.
$ sips -s format png HelpViewer.icns --out help_viewer.png
I haven't seen many posts with positive comments regarding sips
as an image manipulation program. But, as far as I can tell, it's the only thing that will accept an ICNS file and dump out PNG. I think the quality speaks for itself.
UPDATE: Fixed PNG transparency issue in Internet Explorer < 7.
Nice tip, very useful, Thank you :)
Thanks, Milhouse!
A question: How can I convert the iCal icon with the correct date. It always shows July 17th, like it was in Tiger when you had not started the prog ...
Thanks for your help.
@HPE - That's a good question, but I don't have an easy answer for you. I'm fairly certain OS X uses a blank calendar image and writes the date on it dynamically. You can find the blank iCal icon in the iCal package at iCal/Contents/Resources/App-empty.icns.
I think I have found THE easy way, juts drag the .icn to preview app and save as png ;-)
This Article was just what I was looking for; now i can use some nice icons with my re-design
This free app does this and can also get the icon data from any folder or app. http://osxiconeditor.phatcode.net/Icon2PNG.html
[...] X ha un tool da riga di comando che deriva dal BSD, sips (scriptable image processing system), che permette di eseguire questa operazione in completa autonomia, senza dover installare software di terze [...]