Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iconset:error: Failed to generate ICNS

I'm trying to make an iconset for an application, but keep on getting an error when I make it: Hexchat.iconset:error: Failed to generate ICNS.

I tried both exporting .png files individually from Illustrator, as well as using a script. Current script with a 1024x1024 png file as Hexchat_8.png is:

mkdir Hexchat.iconset
sips -z 16 16     Hexchat_8.png --out Hexchat.iconset/hexchat_16x16.png
sips -z 32 32     Hexchat_8.png --out Hexchat.iconset/[email protected]
sips -z 32 32     Hexchat_8.png --out Hexchat.iconset/hexchat_32x32.png
sips -z 64 64     Hexchat_8.png --out Hexchat.iconset/[email protected]
sips -z 128 128   Hexchat_8.png --out Hexchat.iconset/hexchat_128x128.png
sips -z 256 256   Hexchat_8.png --out Hexchat.iconset/[email protected]
sips -z 256 256   Hexchat_8.png --out Hexchat.iconset/hexchat_256x256.png
sips -z 512 512   Hexchat_8.png --out Hexchat.iconset/[email protected]
sips -z 512 512   Hexchat_8.png --out Hexchat.iconset/hexchat_512x512.png
cp Hexchat_8.png Hexchat.iconset/[email protected]
iconutil -c icns Hexchat.iconset
rm -R Hexchat.iconset

Every time it is the same, though, with or without an output file:

iconutil -c icns Hexchat.iconset
Hexchat.iconset:error: Failed to generate ICNS.

iconutil -c icns Hexchat.iconset -o hexchat.icns
Hexchat.iconset:error: Failed to generate ICNS.

chmod'ing and/or sudo doesn't work, and the man page shows no option for verbose error output. What am I doing wrong?

like image 663
Terekhov Avatar asked Jul 26 '15 00:07

Terekhov


2 Answers

Change your file name from hexchat_16x16.png to icon_16x16.png, and the same for all the other sizes.

I've just had the same error, with names something like myappicon16x16.png and couldn't understand why it was failing.

I would love to take credit for finding this out, but after seeing your question, I found this StackOverflow answer.

like image 141
Darren Hale Avatar answered Sep 20 '22 19:09

Darren Hale


In my case, mac osx app was giving this error when I tried to archive. Naming convention

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]

was correct but I found the alpha = NO for my icons. I exported images again with alpha = Yes and error was fixed.

like image 33
zeeawan Avatar answered Sep 19 '22 19:09

zeeawan