Creating an ICNS Programmatically : “Unsupported Image Size”
I'm trying to create an ICNS (including a 1024x1024 image) programmatically. Currently I'm creating an NSImage , then I create CGImageRef objects with the appropriate resolution, finally I'm adding them to an icon by using CGImageDestinationAddImage() . Peter Hosey has helped me create '@2x' images already, but the sizes of the images don't wanna be set. This is the code (still a bit messy, sourcefile represents the path to the image) : NSSize sizes[10]; sizes[0] = NSMakeSize(1024,1024); sizes[1] = NSMakeSize(512,512); sizes[2] = NSMakeSize(512,512); sizes[3] = NSMakeSize(256,256); sizes[4] =