Re: Creating a .icns file again


Alex Zavatone
 

Why no alpha?  

Also, just enter man iconutil.

More details.


Lots here.


Old docs:

Use iconutil to Create an icns File Manually

The iconutil command-line tool converts iconset folders to deployment-ready, high-resolution icns files. (You can find complete documentation for this tool by entering man iconutil in Terminal.) Using this tool also compresses the resulting icns file, so there is no need for you to perform additional compression.
It looks like you already have this part

  • icon_16x16.png
  • icon_16x16@...
  • icon_32x32.png
  • icon_32x32@...
  • icon_128x128.png
  • icon_128x128@...
  • icon_256x256.png
  • icon_256x256@...
  • icon_512x512.png
  • icon_512x512@...

Though it’s an old tip…

Let Xcode Create an icns File Automatically

Xcode 4.4 automatically validates and converts an iconset folder to an icns file. All you need to do is add the iconset folder to your project and build the project. The generated icns file is added automatically to the built product.
Do that and see what it creates.  Convert the icns back to a .iconset with iconutil and see what the results are.  There might be special naming conventions for dark mode files.






On Nov 17, 2018, at 4:44 PM, John Brownie <john_brownie@...> wrote:

OK, now I need to know how to use iconutil, since it's probably changed with Mojave by adding dark mode variants. I get the following icons:
NSISIconImageRep 0x600001873180 Size={128, 128} ColorSpace=Generic RGB colorspace BPS=0 Pixels=128x128 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001870140 Size={128, 128} ColorSpace=Generic RGB colorspace BPS=0 Pixels=128x128 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001871780 Size={128, 128} ColorSpace=Generic RGB colorspace BPS=0 Pixels=256x256 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001872800 Size={128, 128} ColorSpace=Generic RGB colorspace BPS=0 Pixels=256x256 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001872fc0 Size={16, 16} ColorSpace=Generic RGB colorspace BPS=0 Pixels=16x16 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x6000018737c0 Size={16, 16} ColorSpace=Generic RGB colorspace BPS=0 Pixels=16x16 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001870480 Size={16, 16} ColorSpace=Generic RGB colorspace BPS=0 Pixels=32x32 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001873700 Size={16, 16} ColorSpace=Generic RGB colorspace BPS=0 Pixels=32x32 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x60000186c400 Size={18, 18} ColorSpace=Generic RGB colorspace BPS=0 Pixels=18x18 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x60000186f580 Size={18, 18} ColorSpace=Generic RGB colorspace BPS=0 Pixels=18x18 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x60000186f8c0 Size={18, 18} ColorSpace=Generic RGB colorspace BPS=0 Pixels=36x36 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x60000186ff80 Size={18, 18} ColorSpace=Generic RGB colorspace BPS=0 Pixels=36x36 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x60000186d800 Size={32, 32} ColorSpace=Generic RGB colorspace BPS=0 Pixels=32x32 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x60000186bc40 Size={32, 32} ColorSpace=Generic RGB colorspace BPS=0 Pixels=32x32 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x60000186bbc0 Size={32, 32} ColorSpace=Generic RGB colorspace BPS=0 Pixels=64x64 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001864f00 Size={32, 32} ColorSpace=Generic RGB colorspace BPS=0 Pixels=64x64 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x6000018566c0 Size={36, 36} ColorSpace=Generic RGB colorspace BPS=0 Pixels=36x36 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001856b40 Size={36, 36} ColorSpace=Generic RGB colorspace BPS=0 Pixels=36x36 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x6000018563c0 Size={36, 36} ColorSpace=Generic RGB colorspace BPS=0 Pixels=72x72 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001850380 Size={36, 36} ColorSpace=Generic RGB colorspace BPS=0 Pixels=72x72 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x60000184cc40 Size={48, 48} ColorSpace=Generic RGB colorspace BPS=0 Pixels=48x48 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x6000018408c0 Size={48, 48} ColorSpace=Generic RGB colorspace BPS=0 Pixels=48x48 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001840780 Size={48, 48} ColorSpace=Generic RGB colorspace BPS=0 Pixels=96x96 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001840c00 Size={48, 48} ColorSpace=Generic RGB colorspace BPS=0 Pixels=96x96 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x60000183cac0 Size={256, 256} ColorSpace=Generic RGB colorspace BPS=0 Pixels=256x256 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001839b80 Size={256, 256} ColorSpace=Generic RGB colorspace BPS=0 Pixels=256x256 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001839740 Size={256, 256} ColorSpace=Generic RGB colorspace BPS=0 Pixels=512x512 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001838a80 Size={256, 256} ColorSpace=Generic RGB colorspace BPS=0 Pixels=512x512 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001839b00 Size={512, 512} ColorSpace=Generic RGB colorspace BPS=0 Pixels=512x512 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001839d40 Size={512, 512} ColorSpace=Generic RGB colorspace BPS=0 Pixels=512x512 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x6000018297c0 Size={512, 512} ColorSpace=Generic RGB colorspace BPS=0 Pixels=1024x1024 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001828b40 Size={512, 512} ColorSpace=Generic RGB colorspace BPS=0 Pixels=1024x1024 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x6000018164c0 Size={1024, 1024} ColorSpace=Generic RGB colorspace BPS=0 Pixels=1024x1024 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x600001817040 Size={1024, 1024} ColorSpace=Generic RGB colorspace BPS=0 Pixels=1024x1024 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua,
NSISIconImageRep 0x600001815d40 Size={1024, 1024} ColorSpace=Generic RGB colorspace BPS=0 Pixels=2048x2048 Alpha=NO AppearanceName=NSAppearanceNameAqua,
NSISIconImageRep 0x6000018147c0 Size={1024, 1024} ColorSpace=Generic RGB colorspace BPS=0 Pixels=2048x2048 Alpha=NO AppearanceName=NSAppearanceNameDarkAqua

I need to create files for 16x16 up to 1024x1024 in normal and @2x size, but how do I specify light/dark? Stack Exchange tells me that these files will work, but that's pre-Mojave:
icon_16x16.png
icon_16x16@...
icon_32x32.png
icon_32x32@...
icon_128x128.png
icon_128x128@...
icon_256x256.png
icon_256x256@...
icon_512x512.png
icon_512x512@...

man iconutil doesn't help, and I can't find anything with a search.

John
--
John Brownie
Mussau-Emira language, New Ireland Province, Papua New Guinea
Kouvola, Finland




Join cocoa@apple-dev.groups.io to automatically receive all group messages.