Image Assets - why can't we submit a 1024x1024 icon and let it be resized?

Maybe we can do this, but I can't see why we can't submit a 1024x1024 image, and all the others required just get resized automatically.

It's a bit of a pain to have to produce about 13 different sizes each time an app is submitted.

Another question. If it is an iPhone app that works in iPhone mode on the iPad. Is it necessary to include all the iPad icon sizes in the Image Asset page?

Thanks.

 iPhone 4S 32Gb,  AppleTV2-OTHER,  iPad 32Gb Wi-Fi  iMac 27" 3.4GHz

Posted on Oct 10, 2013 3:37 AM

Reply
16 replies

Oct 10, 2013 5:46 AM in response to igmackenzie

Because this is Apple we are talking about. Apple will delay the launch of a major product to make the screws more shiny. You are supposed to optimise each image for its targetd resolution. Don't just resize them. Apple isn't going to prevent you from just resizing them, but they aren't gong to make it easy for you either.


What you want to do is buy an app called iDraw. It is a vector-based drawing app. Build your icon in that and don't worry about the resolution, think of canvas size. When you are ready to export the icon, resize the vector drawing to the appropriate canvas size and export as PNG. This way, lines and shadows will have the same size regardless of icon size.

Oct 10, 2013 7:45 AM in response to igmackenzie

I don't know the why's and wherefore's, but you can build icns files with all the (resized) requisite image sizes in one click with a simple Automator app a user on my website provided. You don't even need to start with a 1024x1024, as it will make that size for you too (though obviously the source image should be at least that size or greater for the sake of quality).


http://applehelpwriter.com/2013/07/22/automator-make-your-own-icons/


(Disclaimer: this is a link to my own personal website)

Oct 10, 2013 8:40 AM in response to Phil Stokes

Thanks Phil. That little app looks useful, but I'm confused by the output.

Currently, I build the 1024x1024 icon in Photoshop. Then I resize the image 13 times for 152, 144, 120, 114, 100, 80, 76, 72, 58, 57, 50, 40 and 29, saving each time as 'xxx app icon 152x152.png' etc.

How would I use this Picture to Icon?

How do I use the output? Is it a case of exporting each icon individually? How do I know what the size is of each to place them in the Image Asset boxes?

Only 10 icons output, but I have 14 required each time.

Questions, questions........

Oct 10, 2013 9:00 AM in response to igmackenzie

What I do is export the image from photoshop as one .png (1024x1024, if you like). Then click the Picture2Icon.app, and in the choose file dialogue, select the exported .png. It'll build you a composite .icns file that contains all of the following sizes:




icon_16x16.png (= 16 x 16)

icon_16x16@2x.png (= 32 x 32)

icon_32x32.png (= 32 x 32)

icon_32x32@2x.png (= 64 x 64)

icon_128x128.png (= 128 x 128)

icon_128x128@2x.png (= 256 x 256)

icon_256x256.png (= 256 x 256)

icon_256x256@2x.png (= 512 x 512)

icon_512x512.png (= 512 x 512)

icon_512x512@2x.png (= 1024 x 1024)



If you drag that icns file onto the Preview icon on the dock, you'll see the output.


I don't know what the other sizes are that you need. Perhaps they're iOS specific? The sizes above are mandated by the command line utility "iconutil" (you can do 'man iconutil' in Terminal for more info) and are all the sizes required for OS X apps, AFAIK.


How you import icns into Xcode 5 I'm also not entirely sure. In Xcode 4, I just imported it into the Projects folder, then dragged it into the image well in the Target > General panel.


User uploaded file


I don't see that image well in new projects I've created in Xcode 5, and the Image Assets don't seem to let you drag and drop composite icns files. I'm hoping I just haven't found the right place to do it, rather than Xcode 5 has regressed to make this more difficult. Please let me know if you figure that out!


Oct 10, 2013 9:06 AM in response to Phil Stokes

Thanks again, Phil. I should have said that it is iOS I am involved with, and the icon sizes required are the ones I posted in my last message.

When you click on 'Image.xassets' in Project Navigator, it brings up placeholders for the 16 icons I need for iPhone and iPad. I just drag the png files I saved from PS from Finder into the placeholder.

Can the app you posted on be modfied to produce different sizes?

Oct 10, 2013 9:18 AM in response to igmackenzie

No, I don't believe so, because ultimately what it does is use this bash command


iconutil -c icns /pathtodestination/iconset.icns


and the iconutil only produces those specific formats.


I'll have to look into this a bit more (I need to know how to import icns in one fell swoop without plugging away at all the different files, like you), but I though Xcode had its own iconbuilder utility. I remember when I first started messing around with the terminal utill a year or so ago, I'm sure I remember reading that Xcode could generate the requisite files automatically.


Maybe I'm misremembering, or maybe Xcode 5 has changed. I'll look into it (alas, it's bedtime here in Thailand so it won't be till tomorrow).


If you dig up any answers yourself please post back as I'd like to know too.


Thx! 🙂

Oct 10, 2013 9:37 AM in response to igmackenzie

Just had a quick look at the documentation in Xcode. Doesn't look like any of it has been updated for Xcode 5 with regard to icons.


Well, I wasnt' going mad. There was a tool called "icon builder" but even the last updated document said don't use it for high-res work.


You should probably have search for and have a read of "Optimizing for High Resolution" in Xcode menu: Help > Documentation & API Reference. But the short answer at the moment does seem to be that it's manual imports only (I'll add that to my list of annoying regressions with Xcode 5, then... :| )...

Oct 11, 2013 12:22 AM in response to Phil Stokes

Looking into this a bit more, it does look as if Xcode isn't going to let you do this in one drag and drop move. That said, I don't think it'd be that hard to create a script to do this.


Contrary to what I said earlier, I realise it would be trivial to adapt the Automator workflow from my website, as we don't actually need or want the iconutil command anymore since we don't want to make an icns file at all. Most of the size re-scalings are already in there (for Mac OS X), you can just add/delete the ones you need/don't want, following the same pattern of actions (you need to open the app in Automator and you'll see its fairly obvious how it works).


Also, the .json file in Image.xcassets/AppIcon.iconset/contents.json can be edited manually in TextWrangler. It has the form


{

"images" : [

{

"idiom" : "iphone",

"size" : "29x29",

"scale" : "2x"

},

{

"idiom" : "iphone",

"size" : "40x40",

"scale" : "2x"

},

{

"idiom" : "iphone",

"size" : "60x60",

"scale" : "2x"

},

....

and so on for all the other sizes, until

.... ],

"info" : {

"version" : 1,

"author" : "xcode"

}

}


When you add a file from the project sidebar by dragging and dropping what it actually does is add the 'filename' key, so you get something of the form


"size" : "256x256",

"idiom" : "iphone",

"filename" : "myIcon256.png",

"scale" : "1x"


for each one, where the pink bits are obviously variables that change for each format.


So, the general form of a solution would be to have a couple of scripts, one (could be done in Automator or AppleScript) that takes a single 1024x1024.png and creates all the requisite sizes, and another that takes the name of the png, and outputs a plain text file called Contents.json that has the structure above, adding the filename and number to each block. That's probably a job best done with a bash script. All you do then is drag the multiple images to the project sidebar, and drag the new 'contents.json' file into the xcassets/AppIcon.iconset folder.


Well, that's the basic form of a solution, and I suppose once having got that far you could wrap it all up into an neat little xcode utility package and sell it on the app store! 🙂


I guess I'll think about writing a free utility to do this at some point, but I don't know how long it'll take me to get round to it. Maybe someone else can take this idea and run with it? If not, I'll put it on my to-do list, but right now that's already pretty long so don't hold your breathe. If I ever do get round to it, I'll post a link back here.

Oct 11, 2013 5:28 AM in response to Phil Stokes

Welcome to the wonderful world of trying to hack up Xcode. I wouldn't focus so much on "Xcode5 regressions". This isn't a regression, but standard procedure. I don't know if there is any application that Apple changes as frequently as Xcode. If you try to do something like write a helper utility, or a book, by the time you finish there will be a brand new version of Xcode that changes everything. But Xcode is free, so we can't complain, right? If there was some competing IDE that wasn't an open source project with the same philosophy, I would jump at it.

Oct 11, 2013 8:01 AM in response to etresoft

etresoft wrote:

If you try to do something like write a helper utility, or a book, by the time you finish there will be a brand new version...


I believe that's exactly the business model book publishers and commercial software developers welcome. Add a new chapter or two to a book, a couple of minor features and interface refreshers to an app, and all your old customers become new ones all over again...

Oct 11, 2013 9:45 AM in response to Phil Stokes

Phil Stokes wrote:


I believe that's exactly the business model book publishers and commercial software developers welcome. Add a new chapter or two to a book, a couple of minor features and interface refreshers to an app, and all your old customers become new ones all over again...

I don't know about that. What author or publisher in their right mind is going to fund a new book knowing that it will be obsolete by the time it is complete? As a small software developer, I like Apple's OS-level churn because it keeps the bigger companies off balance. There is always some new opportunity that Apple provides in some new OS. You can get your foot in the door if you're fast enough. As a user of Apple's developer tools, I don't like the churn because it is too much to keep up with. Plus, you are thinking from an out-moded perspective. In the world of the App Store, there are no more new customers - just free updates. Along with that opportunity for new customers and markets comes an obligation to support existing customers.

Oct 11, 2013 10:00 AM in response to etresoft

Because your assumption that "its obsolete by the time its complete" is an exaggeration.


The reality is that all the publishers like Apress, Big Nerd Ranch, Que, Sams, Dummies, O'Reilly etc etc are out with their books within about 3 months of the s/w release. They get a good 9-12 months sales out of them before they're updated with a few edits and an extra chapter or two. Not that I'm either denigrating or undervaluing the work that goes into doing such edits — I worked in publishing for quite a few years in the mid 90s onwards - but it's largely recyclicing and new sales are helped by the fact that s/w companies keep making changes. You've only got to look at something like Aaron Hillegaas' book on Cocoa to see what I mean, or the never ending Apple OS X training series.


The same model applies to s/w publishers. Look at something like Parallels which has gone through version 5, 6, 7, and now 8 in less than 4 years. All paid upgrades.


All of which is interesting, but way off-topic.

Oct 11, 2013 2:51 PM in response to Phil Stokes

Phil Stokes wrote:


All of which is interesting, but way off-topic.

I don't know about that either. I don't buy many books so perhaps you are right about the publishers. I would have been more correct to say no one in their right mind would buy one of these books. Suppose Mavericks gets released tomorrow, then the books will be out by January at the earliest. WWDC is in June and that will bring a whole new cycle.


These icon images are a good example of that. Trying to write some tool to help is like trying to hit a moving target. People are confused about why they need to do all of these icons and how. I have tried to suggest a good way to get true retina icons without having the benefit of a design team you can just task to do it for you. It does cost $25, but upgrades are free, as they are for everything in the Mac App Store. Parallels is an outlier in many respects. It can't run in the sandbox and provides good value for inexpensive upgrades. It is great software for everything except comparisons to other software.

Oct 12, 2013 12:36 AM in response to etresoft

etresoft wrote:

Suppose Mavericks gets released tomorrow, then the books will be out by January at the earliest.


Nope, they'll be out pretty much the same time as 10.9 (as you'll no doubt see by the end of this month or thereabouts). You seem to think the authors and publishers are going to wait till the public release before they get started. Mavericks was released to developers a long time ago, as you know full well.



etresoft wrote:


Trying to write some tool to help is like trying to hit a moving target. People are confused about why they need to do all of these icons and how. I have tried to suggest a good way to get true retina icons...


It was a good suggestion, but I'm not sure why you're so against a simple programming solution either. It wouldn't take more than an afternoon to put something together like I suggested above. The only reason I haven't done it is I don't have a spare afternoon (or to put it another way, it's not high up enough on my priority list to get plugged into my next available afternoon). For others it might be, so long as they know their way around a bit of applescript, bash and objective-c. You could create an AS-ObJC project that would ask for a png, ask you for the path to Assets folder and in one click reproduce the required pngs and move them into place.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Image Assets - why can't we submit a 1024x1024 icon and let it be resized?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.