<![CDATA[elcapitan - ruby0x1.notes]]>https://notes.underscorediscovery.com/Ghost 0.11Mon, 01 Feb 2021 15:35:39 GMT60<![CDATA[fix iconutil El Capitan "Unsuported image format"]]>Just a short post with a really obscure error from iconutil, after an El Capitan upgrade.

If you run a command similar to:
iconutil -c icns some.iconset -o some.icns

And you get (sic):
error: Unsuported image format

Here are two important things:


image prefix must be icon_

This

]]>
https://notes.underscorediscovery.com/el-capitan-iconutil-unsuported-image-format/ab5a5c5a-0bcb-477b-820e-af7e1be015ddFri, 23 Oct 2015 07:10:41 GMT

Just a short post with a really obscure error from iconutil, after an El Capitan upgrade.

If you run a command similar to:
iconutil -c icns some.iconset -o some.icns

And you get (sic):
error: Unsuported image format

Here are two important things:


image prefix must be icon_

This one is easy. The files need to be named with icon_ now.
Here's a list for convenience: Note that in future this may change so always check the docs (here and here).

icon_16x16.png  
icon_16x16@2x.png  
icon_32x32.png  
icon_32x32@2x.png  
icon_128x128.png  
icon_128x128@2x.png  
icon_256x256.png  
icon_256x256@2x.png  
icon_512x512.png  
icon_512x512@2x.png  

image format matters

The guideline suggests PNG with an sRGB color profile is the recommended format for app icons. It may convert the icons without the sRGB profile, but you might notice errors in the colors if you're checking close enough.

Secondly, and this is the one that tripped me up:
The png file likely requires the alpha flag.

Either that, or the first one it finds is what it tries to use for every other one, and if they differ it will fail without a clear error.

This sounds obscure, so here is how I found what it wanted.

  • Open the file in preview
  • Press ⌘I (cmd+I) or Tools -> Show Inspector
  • Click the i icon and under the general tab, compare the images.
  • I noticed the first bunch said "Has Alpha" and the last one didn't.

fix iconutil El Capitan

Once I added the alpha channel it worked again (even though all my icons were already matching and working previously).

Hope that helps!

]]>