Converter Icon For Mac



  1. Image To Icon Converter For Mac
  2. Converter Icon For Mac Catalina
  3. Free Online Icon Converter Windows 10
  4. Converter Icon For Mac Os

How to convert PNG to ICNS. Script to automate the process; Setting icon for a Qt-based application on Mac OS; How to convert PNG to ICNS. There is an out-of-the-box Mac OS tool for such conversion - iconutil (documentation for which is nowhere to find at Apple’s website, so this brief man page is. IConvert Icons has been carefully designed to make it as easy as possible to create and convert icons. It converts icons in all of the popular icon formats, including png, ico, and icns. It is also the only icon converter to support converting directly from SVG.

Developing an application for Mac OS, sooner or later you’ll want to add an icon to it. And Mac OS uses Apple’s own format for application icons - Apple Icon Image format - files with .icns extension. But how does one create such a file?

Image To Icon Converter For Mac

It is actually not so hard, but there are some tricky moments. I’ll cover those and as a bonus I’ll show you how to use .icns icon in Qt-based application (deadly simple).

There is an out-of-the-box Mac OS tool for such conversion - iconutil (documentation for which is nowhere to find at Apple’s website, so this brief man page is all we have).

Converter Icon For Mac Catalina

However, you cannot just take a random PNG and feed it to iconutil. I mean, you can, but it will give you the following error:

Because iconutil takes only specially named folders. Just how am I supposed to know about that? And it shows similar short and useless error messages for other things it doesn’t like. For example, here’s an output for the situation when files inside iconset folder are not named “properly” or have “wrong” dimensions:

Go figure.

After a set of trials and browsing the internet I found out (hopefully) all the requirements:

  1. First you need to prepare a set of icon pictures and put those into a folder with .iconset “extension”, for example some.iconset;
  2. Pictures from this set should be named in a certain way and have specific dimensions.

Correct dimensions can be found in Apple Guidelines. So it’s 5 different dimensions, but actually 10 “physical” files as each dimension is represented twice (you’ll see why). And these files have to be named according to the following format:

So here’s the full list of proper filenames:

At the same time, I’ve got a commit to my script, and this commit adds more sizes, which supposedly solves some missing size error. I never got such an error, so even though I accepted the commit, I won’t add those changes to the article.

Script to automate the process

But that’s rather boring to create all those files manually in some graphics editor, right? So let’s use sips utility (although, I recommend using ImageMagick, as it gives better quality results):

Better, but still - we have to run it 10 times. So let’s write a Python script for that:

The full script is published here.

As an example, I prepared a square picture with a resolution of 2048x2048 and 150 pixel per inch, so there is plenty room to prevent upscaling:

Pass picture path to the script like that:

The script will:

Converter
  1. Create a folder ~/Desktop/apple.iconset;
  2. Generate 10 files with different dimensions and save those into that folder;
  3. Call iconutil on this folder and put resulting apple.icns to ~/Desktop/.
Mac video converter app

Here’s how the final apple.icns looks like in Preview:

Free Online Icon Converter Windows 10

So everything from that folder is bundled into one file.

And now the bonus part - how to use .icns as an icon for a Qt-based application.

As I said, it’s deadly simple: put apple.icns into your Qt project folder and add the following line into your-project.pro:

And that’s it:

Mac

Converter Icon For Mac Os

Name PNG ICNS
Full namePNG - Portable Network GraphicsICNS, Mac OS X Icon Resource File
File extension.png.icns
MIME typeimage/png
Developed byPNG Development GroupApple
Type of formatlossless bitmap image formatSystem
DescriptionPortable Network Graphics (PNG) is a raster graphics file format that supports lossless data compression. PNG was created as an improved, non-patented replacement for Graphics Interchange Format (GIF), and is the most used lossless image compression format on the Internet. PNG itself does not support animation at all. MNG is an extension to PNG that does; it was designed by members of the PNG Group.Icon files used on MAc computers and other OS X devices use the file extension ICNS. These icon files are used to display a small image (icon) in the OSX Finder or dock, representative for an application which it is linked to. ICNS files support images in a variety of dimensions. They range from 16x16 pixels to 512x512 pixels. As of OS X Mountain Lion, ICNS files can support even bigger images, namely of the 1024x1024 pixels dimension.
Technical detailsPNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel), and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK.The content of the ICNS file typically consists of one or more images in the PNG format. This format is pretty handy as a base for the ICNS since it allows transparency. The ICNS file supports 1-bit as well as 8-bit alpha channels. What differentiates them from Windows' ICO files is that ICNS files can contain individual icon resources, thus acting more like a container file.
File conversion PNG conversion ICNS conversion
Associated programsAdobe Photoshop, Paint Shop Pro, the GIMP, GraphicConverter, Helicon Filter, ImageMagick, Inkscape, IrfanView, Pixel image editor, Paint.NET, Xara Photo & Graphic Designer.Adobe Photoshop with IconBuilder for Mac Plugin (Mac), Apple Preview (Mac), Axialis IconWorkshop (Windows), Folder Icon X (Mac), Icon Machine (Mac), Iconographer (Mac), Inkscape (Windows, Mac & Linux), Snap Converter (Mac), XnViewMP (Windows, Mac & Linux)
Wiki https://en.wikipedia.org/wiki/Portable_Network_Graphics https://en.wikipedia.org/wiki/Apple_Icon_Image_format