DEV Community

Mansour Moufid
Mansour Moufid

Posted on

Make a macOS app icon from an image

macOS has everything you need to make an icon file for your application from the terminal.

macOS application icons are really a bundle ("iconset") of images at various sizes (16×16, 32×32, 64×64, ..., 1024×1024).

First create a myicon.iconset directory containing your icon image at all the sizes needed using the sips command line tool:

sips -Z 16 myicon.png --out myicon/icon_16x16.png
sips -Z 32 myicon.png --out myicon/icon_16x16@2x.png
sips -Z 32 myicon.png --out myicon/icon_32x32.png
sips -Z 64 myicon.png --out myicon/icon_32x32@2x.png
...
Enter fullscreen mode Exit fullscreen mode

Then bundle them together with the iconutil command:

iconutil -c icns myicon.iconset
Enter fullscreen mode Exit fullscreen mode

Here is a Makefile to do this automatically. Just save the Makefile to a directory containing your icon image file; change the variables NAME and ICON at the top; type make in the Terminal, and you're done: https://gist.github.com/eliteraspberries/a536f28b0498ec844fb210bb597738e2

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay