I was recently involved in a thread on the Apple discussion forums that involved converting ICNS files to various image file formats. I had been using the unix sips command to accomplish this task for quite a while in my own scripts. I never thought to mention it as an undocumented feature, until the original poster of the thread mentioned it might be something others would find useful.
Use the following command to convert (as an example) an ICNS file to a png image file:
sips -s format png /Path/To/Icon.icns --out /Path/To/ConvertedImage.png
The command above would convert an ICNS file named Icon.icns to a png file named ConvertedImage.png. To convert to other image file formats, simply replace the portion of the command that reads png with the file format of your liking. You can choose from these possible formats: jpeg, tiff, png, gif, jp2, pict, bmp, qtif, psd, sgi, and tga.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20051225191249727