I can't seem to find Icon Composer on the Xcode versions at run on Mountain Lion.
Where is it? Has it been taken out? How to get it back?
It's been moved into one of the add-on packages for Xcode, and is now part of the Graphics Tools for Xcode package.
Apparently this is (at least partly?) because this is no longer the 'officially recommended' way to generate (high resolution) icons. See the OS X Human Interface Guidelines and the High Resolution Guidelines for more info.
I believe Icon Composer doesn't support the highest resolution icons required these days (1024x1024), and you're encouraged to use iconutil
instead, which does, and allows you to convert between ICNS and "iconsets" (effectively just a folder containing a collection of PNG files of different resolutions).
If you still want it, you can get it as follows:
In Xcode, go to the Xcode > Open Developer Tool > More Developer tools....
You'll need to log in (or register) with your (free) Apple Developer account, and then you'll be shown a list of available packages for Xcode, including the Graphics Tools for Xcode. Grab the latest one and install.
This DMG of Graphics Tools contains:
What I found easier than downloading, installing, and finding Icon Composer was using the command-line tool iconutil
.
.iconset
Enter this command into the Terminal window:
iconutil -c icns <iconset filename>
where <iconset filename>
is the path to the folder containing the set of pngs.
.icns
file is written to the same location as the folder.You must have the following set of pngs:
icon_16x16.png
[email protected]
icon_32x32.png
[email protected]
icon_128x128.png
[email protected]
icon_256x256.png
[email protected]
icon_512x512.png
[email protected]
[email protected]
should be 256x256.
Commented
Feb 13, 2015 at 3:45
iconutil
on an .icns
file and examining the images that result. (Though I'm not sure I understand why either.)
Commented
Feb 13, 2015 at 5:37
Check out Icon Composer 2x. It's a replacement for Apple's Icon Composer that supports Retina Resolution Icons.
You can get it here: http://www.lemonmojo.com/work#IconComposer2x
I wrote the app, it's free and source code is available on Github if you're interested.
I created a droplet that creates an icon from a PNG using applescript, here's the code:
on open input
repeat with input in input
set inputalias to input as alias
tell application "Finder"
set inputname to name of inputalias
set inputcontainer to container of inputalias
end tell
if inputname ends with ".png" then
set foldername to ((text 1 through ((length of inputname) - 4) in inputname) & ".iconset") as text
tell application "Finder"
try
make new folder at inputcontainer with properties {name:foldername}
end try
set thefolder to folder foldername of inputcontainer
set iconnames to "icon_16x16.png
[email protected]
icon_32x32.png
[email protected]
icon_128x128.png
[email protected]
icon_256x256.png
[email protected]
icon_512x512.png
[email protected]"
set iconnames to paragraphs of iconnames
repeat with iconname in iconnames
duplicate inputalias to thefolder with replacing
set iconfile to file inputname of thefolder
set name of iconfile to iconname
end repeat
end tell
set folderpath to POSIX path of (thefolder as alias)
do shell script "iconutil -c icns " & (quoted form of folderpath)
display dialog ("Icon created for " & inputname) giving up after 10
tell application "Finder" to delete thefolder
else
display dialog (inputname & " cannot be made into an icon. Please choose a PNG file.")
end if
end repeat
end open