# Missing .icns sizes?

**URL:** <https://forum.xojo.com/t/missing-icns-sizes/20731>\
**Category:** macOS\
**Created:** [December 8, 2014, 6:29pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731 "2014-12-08T18:29:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [December 8, 2014, 6:29pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/1 "2014-12-08T18:29:11Z")

</div>

Does anyone know definitively if 48x48 and 64x64 standard and retina versions are required for a .icns file?  
Some people say yes they are needed, but others say no - just 16x16, 32x32, 128x128, 256x256, and 512x512 (and the @2x versions).

I cannot seem to get a straight answer on this ☹

Thank you.

---

<div class="post-metadata">

**Author:** ![Tim\_Jones](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_jones/32/8627_2.png) [@Tim\_Jones](https://forum.xojo.com/u/Tim_Jones)\
**Post date:** [December 8, 2014, 6:37pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/2 "2014-12-08T18:37:10Z")

</div>

I use the command line iconutil tool and these sizes:

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

The resulting icns file scales from the lowest to the highest sizes very cleanly.

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [December 8, 2014, 6:42pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/3 "2014-12-08T18:42:33Z")

</div>

That is also what I use, but lots of people also say that 48x48 and 64x64 should be included?

---

<div class="post-metadata">

**Author:** ![Tim\_Jones](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_jones/32/8627_2.png) [@Tim\_Jones](https://forum.xojo.com/u/Tim_Jones)\
**Post date:** [December 8, 2014, 6:52pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/4 "2014-12-08T18:52:32Z")

</div>

Not according to the HIG. Those go back to the days of hardcoded icon sizes.

From [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html)

[quote]Create a Set of Icons That Includes High-Resolution Versions  
You should create a set of icons that consist of pairs of icons (standard and high resolution) for each icon size16x16, 32x32, 128x128, 256x256, 512x512. The naming convention is:

icon\_x[@].png

where is the size of the icon in points, and is @2x for the high-resolution version. (Dont add a scale for standard resolution.) Additionally, the filename must use the icon\_ prefix.

The images must be square and have the dimensions that match the name of the file.

Ideally, you would supply a complete set of icons. However, it is not a requirement to have a complete set; the system will choose the best representation for sizes and resolutions that you dont supply. Each icon in the set is a hint to the system as to the best representation to use. A complete set consists of the following:

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[/quote]

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [December 8, 2014, 6:53pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/5 "2014-12-08T18:53:41Z")

</div>

> [@149375:@Richard Summers](#):
>
> That is also what I use, but lots of people also say that 48x48 and 64x64 should be included?

48 is 16x16@3x.

Actually, 3x is used for the iPhone, but could come to Mac OSX one of these days.

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [December 8, 2014, 7:05pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/6 "2014-12-08T19:05:23Z")

</div>

@3x is used for iPhone but I believe only for iOS8, and only if supporting iPhone6.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [December 8, 2014, 7:28pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/7 "2014-12-08T19:28:31Z")

</div>

> [@149388:@Dave S](#):
>
> @3x is used for iPhone but I believe only for iOS8, and only if supporting iPhone6.

indeed. But knowing Apple never stops innovating, one of these days we may have a Retina 3x laptop.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [December 8, 2014, 8:40pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/8 "2014-12-08T20:40:34Z")

</div>

The 48 size I believe comes from icon designers who create each size; 48x48 is a standard for Windows so professional icon designers will create that size. I’m not sure it was ever preferred on a Mac, but the Dock will use it if available.

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [December 8, 2014, 10:21pm UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/9 "2014-12-08T22:21:31Z")

</div>

Ok - this is weird.

I have a folder full of images - f2 refers to the path.

I have the code below which converts all of the images in the folder in to a .icns file:  
However - when I view the .icns file - there are only 9 images and not the expected 10???  
It only has 1 image sized 512 (as opposed to the expected 2).

Does anyone have any ideas?

[code]// ---------------------------------------- CREATE PROPER FOLDER TO HOLD THE PNGS FOR CONVERSION  
s.Execute(“mkdir “+f2.shellpath+”/mypng.iconset”)  
s.Execute(“touch “+f2.shellpath+”/myicon.icns”)

Dim iconSetFolder as FolderItem = F2.Child(“mypng.iconset”)  
Dim iconICNSFile as FolderItem = F2.Child(“myicon.icns”)

// COPY ALL PNG FILES TO THE NEW iconSetFolder FOLDER  
S.Execute("cp “+f2.ShellPath+”/\*.png "+iconSetFolder.ShellPath)

// CONVERT  
s.Execute("iconutil -c icns “+iconSetFolder.ShellPath+” -o "+iconICNSFile.ShellPath)[/code]

Alternatively, does anyone have a better way of converting all images inside a folder (f2) to a .icns file?

P.S - I want to do this inside of Xojo - (not via a 3rd party app).

Thank you all in advance.

---

<div class="post-metadata">

**Author:** ![Mike\_Cotrone](https://forum.xojo.com/user_avatar/forum.xojo.com/mike_cotrone/32/19940_2.png) [@Mike\_Cotrone](https://forum.xojo.com/u/Mike_Cotrone)\
**Post date:** [December 9, 2014, 12:06am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/10 "2014-12-09T00:06:16Z")

</div>

[quote=149435:@Richard Summers]Ok - this is weird.

I have a folder full of images - f2 refers to the path.

I have the code below which converts all of the images in the folder in to a .icns file:  
However - when I view the .icns file - there are only 9 images and not the expected 10???  
It only has 1 image sized 512 (as opposed to the expected 2).

Does anyone have any ideas?

[code]// ---------------------------------------- CREATE PROPER FOLDER TO HOLD THE PNGS FOR CONVERSION  
s.Execute(“mkdir “+f2.shellpath+”/mypng.iconset”)  
s.Execute(“touch “+f2.shellpath+”/myicon.icns”)

Dim iconSetFolder as FolderItem = F2.Child(“mypng.iconset”)  
Dim iconICNSFile as FolderItem = F2.Child(“myicon.icns”)

// COPY ALL PNG FILES TO THE NEW iconSetFolder FOLDER  
S.Execute("cp “+f2.ShellPath+”/\*.png "+iconSetFolder.ShellPath)

// CONVERT  
s.Execute("iconutil -c icns “+iconSetFolder.ShellPath+” -o "+iconICNSFile.ShellPath)[/code]

Alternatively, does anyone have a better way of converting all images inside a folder (f2) to a .icns file?

P.S - I want to do this inside of Xojo - (not via a 3rd party app).

Thank you all in advance.[/quote]  
Is your mac possessed? 🙂

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [December 9, 2014, 12:07am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/11 "2014-12-09T00:07:07Z")

</div>

The gloves are coming off !

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [December 9, 2014, 12:40am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/12 "2014-12-09T00:40:10Z")

</div>

Even Iconutil via the terminal only inserts 8 of the 10 images into the .icns???

I even just tried this:

I opened terminal and typed in this: iconutil -c icns  
I then pressed the spacebar, and then dropped a folder of 10 images onto the terminal window. The .icns file was created on the desktop BUT it contained 9 of the 10 images???

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [December 9, 2014, 2:28am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/13 "2014-12-09T02:28:14Z")

</div>

Can anyone please confirm this.

Create a folder containing the 10 image files needed for a .icns file, and then use iconutil to create the file.  
I NEVER get ALL of the images from the folder inside the .icns file - there is always one missing?

Thank you all in advance.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 9, 2014, 4:15am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/14 "2014-12-09T04:15:00Z")

</div>

which one?

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 9, 2014, 9:14am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/15 "2014-12-09T09:14:25Z")

</div>

Hi all,

Get info for one Apple application (say TextEdit),  
run Preview  
cmd-n  
cmd-i

and watch carefully at what you get in the icns file.

Warning: You will get all sizes up to 10214 x 1024 (Was 512 x 512 long time ago),  
WARNING: you will get some images at the same 1024 x 1024, but at 144 dpi.

It may be a good idea to check before writing and sending answers.  
Oh, btw: the icon look was changed in Yosemite (but not the size as far as I saw before sending my MacBook Pro at repair a 12 days ago).

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [December 9, 2014, 9:26am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/16 "2014-12-09T09:26:25Z")

</div>

[quote=149497:@Richard Summers]Create a folder containing the 10 image files needed for a .icns file, and then use iconutil to create the file.  
I NEVER get ALL of the images from the folder inside the .icns file - there is always one missing?  
[/quote]

I suspect iconedit is astute enough to recognize when 2x pictures are the same as a larger one. For instance, in Tim’s list above, there are several 2x pictures that are identical to larger ones :

`icon_128x128.png
icon_128x128@2x.png // Same as 256x256
icon_16x16.png
icon_16x16@2x.png // same as 32x32
icon_256x256.png
icon_256x256@2x.png // same as 512x512
icon_32x32.png
icon_32x32@2x.png
icon_512x512.png
icon_512x512@2x.png`

This list of 10 files will probably result in 7 pictures inside the icns, because some of them are redundant.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 9, 2014, 10:20am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/17 "2014-12-09T10:20:50Z")

</div>

Michel,

as far as I know, icns files are OS X file and so have entries as large as 1024 x 1024. Read my previous answer.

Redundant ? No, they are not.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [December 9, 2014, 10:25am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/18 "2014-12-09T10:25:09Z")

</div>

[quote=149550:@Emile Schwarz]Michel,

as far as I know, icns files are OS X file and so have entries as large as 1024 x 1024. Read my previous answer.

Redundant ? No, they are not.[/quote]

Think, Emile. `128x128@2x.png` is in fact a 256x256 picture. How is it different from 256x256.png ?  
Inside the icns, and unless I am mistaken, there is only one copy of each picture size…

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 9, 2014, 10:31am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/19 "2014-12-09T10:31:48Z")

</div>

> 128x128@2x.png is in fact a 256x256 picture  
> So white is in fact a simple shade of grey (the last one whithout grey) ?  
> ;-🙂  
> Oh, and what is 128x128@2x.png (in an icns file ?)

Check more carefully. Hint: get an eye in the image dpi…

Remember: I do not have an OS X machine handly, actually.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [December 9, 2014, 10:49am UTC](https://forum.xojo.com/t/missing-icns-sizes/20731/20 "2014-12-09T10:49:09Z")

</div>

[quote=149554:@Emile Schwarz]\>128x128@2x.png is in fact a 256x256 picture  
So white is in fact a simple shade of grey (the last one whithout grey) ?  
;-🙂  
Oh, and what is 128x128@2x.png (in an icns file ?)

Check more carefully. Hint: get an eye in the image dpi…

Remember: I do not have an OS X machine handly, actually.[/quote]

Emile, yes, white is a shade of grey.

For all intents and purposes, `128x128@2x.png` is a 256x256 pixels picture. If you do not understand that 144 dpi = 2 x 72 dpi this is your problem here. And I do not need your professoral and confused hint, thank you.

You have a way of complexifying simple things that never ceases to amaze me…

[Next page](https://forum.xojo.com/t/missing-icns-sizes/20731.md?page=2)
