Slicing/Dicing UI Files - ios

Is there a quick/easier way to create the required graphic files for an iOS UI theme (at standard and 2x resolutions) from a PSD such as http://graphicriver.net/theme_previews/2989093-magnanimous-ios-ui-kit-for-mobile-interface?index=6. The only way I know of is to use Photoshop to painstakingly cut the image up, but it will probably take me the best part of a day to do so.

Take a look at Slicy for Mac OS.

In Photoshop you can use: from the menu: File/Automate/batch and record actions which you use lots of times. Like save As, to -> PNG and add name #2x to it, enz.
After the recording you are able to edit the Action via menu: Windows/Actions

Related

Is it really necessary to provide all the different app icon sizes for an iOS app?

I'm tempted to provide the highest resolution icon and let iOS scale it down as necessary. Is this a bad idea, and (if so) why?
you'll definitely want to produce files of various sizes as required by xCode. You want to make sure that the file presented when the app runs is of a high quality.
There are tools out there that will automatically create all the sizes you need for your app icon. Here is a link to the site that I use: https://makeappicon.com/
Hope that helps!
Yes, it might be bad idea. If your icon art was produced using a vector image editor (e.g., Adobe Illustrator, Adobe Photoshop with vector primitives, Sketch, etc) you best bet is to export all required resolutions yourself. In doing so, you will guarantee the best possible output for each resolution.
Keep in mind that exporting a single high resolution image and then resizing, for each required resolution, using a bitmap editor (e.g., macOS Preview) won't produce the same results.
PS. As already pointed out, I'm not sure your binary will even be accepted by Apple if missing icon data :-(

The most efficient way of adding "AppIcon" to project in Xcode?

Im programming an app in xcode and something has recently come to my attention when designing app icons. Here is the current setup that I have in my project:
Right now I have a 87x87pixel image for the "29pt" option (far left of the image), I also have a 120x120 for the 40pt option(middle) and I have a 180x180 pixel png for the 60pt option(far right). This seems highly inefficient, not only this but I need to supply #2 resolution images too? Surely there is a better way of doing this?
There are a couple of approaches I've taken in the past. One way is to create your icons, etc. in GIMP, Photoshop, etc. If you need to resize them, there's a command line utility called ImageMagick which I find to be a lot easier for resizing images than setting sizes in an image editor. The command you would use for resizing is called mogrify.
Option two is to get your hands on an app called Asset Catalog Generator. You just dump your images in and it spits out the correct file sizes and naming conventions. It's probably the best $4.99 I've spent in a long time.
Update
It appears someone has written a script to create the icons, too. I haven't used it myself, so you might want to poke around and look for others.
Create your app icon (once) at a decent resolution say 1024x1024. Drop the file into MakeAppIcon (a free service) and out pops all your icons in a zip file properly sized, enhanced as necessary, and rendered. Just drop them into images.xcassets and you're done. This avoids having to tweak any icons that may be off by a pixel or two and avoids those annoying Xcode warning messages.This vendor also offer a service for bulk uploading your iTunes screenshots, but I haven't tried that yet. Luv it!
You can use the vector-based images from a PDF. Session 411 from WWDC “What’s New in Interface Builder” discussed—albeit very briefly—Xcode’s support for creating your PNG files at build time from a vectorised PDF.
There is good article on this, you can refer that as well. http://martiancraft.com/blog/2014/09/vector-images-xcode6/
(Note that this does NOT cover PDFs for icons, just for images)
I would suggest you try SquareIcon, which I believe makes creating Xcode app icon sets very easy. Just to let you know, this is my own app.
The app allows you to drop in a generic image file (like a JPG or PNG) and convert it to a .appiconset file which you can put into your project's asset catalog. This takes care of all the naming and resizing that you might have to do manually.
UPDATE 2: I might've misunderstood you. When I wrote this answer, I thought that by 'inefficiency' you meant memory consumption and the resulting app size. If you meant, that making an icon for all the sizes is a lot of work, and you're looking for a better way to do it, consider looking at Adrian B's answer instead.
First of all, no, there is no more efficient way of doing it (unfortunately). Xcode supports vector images, but they are only supported on OS X, AFAIK. On iOS it just generates all necessary images at compile time.
Second, the app icon is small. You won't save a lot of space by optimizing app icon size. If you need to decrease the app size, try finding something that really takes much space. The icon doesn't.
UPDATE: Luckily, Apple realizes, that forcing everybody to download resources that they don't need is no good. So they introduced App Thinning along with iOS 9. I haven't looked into it thoroughly yet, but the general idea is that you upload a binary containing all the resources as usual, but when your users download the app from the AppStore, they get a version containing only resources that they need.

Xcode 6 asset catalog automatically create images for smaller scales

With the need of 3x images in iOS 8 I figured it would be easier to manage images with an asset catalog in Xcode 6. I am trying to just provide a single image, the 3x scaled image to the asset catalog and I want Xcode to automatically downscale that image to generate 2x and 1x versions of the 3x image, so that I don't have to do it manually.
Right now this is what I have:
I really hope that Xcode has such a feature to automatically create 2x and 1x images and I just have not discovered it yet. If there isn't any such feature, are there any alternatives? (I know IconKit but it is annoying and hasn't been updated to support 3x images. If it was made properly in the first place it wouldn't even need an update..)
I know that Xcode automatically can generate all images from a vector pdf, but thats not what I am looking for!
I ended up making a small mac app that takes care of the dirty work. You can drag and drop one or multiple .jpg or .png files into the app's main view; it will detect the input image's scale and create the smaller scaled images. With this app I only need to create a single, 3x image and drag it into the app to create the two smaller images. It saves so much work!
The source can be found on my GitHub page, simply download it and run it on your mac! https://github.com/JonasGessner/ImageReducer
There is another way to solve this problem.
Use Automator to create Mac OS X service which create #3x, #2x and normal image on base of 1 image in #3x resolution automatically. It use just 3 methods: duplicate images, scale down, and rename.
Ready Mac OS X service made in Automator you can find here:
https://github.com/lukszar/iOS-Images-Prepare
late to the party but there is one tool which make all assets #1x, #2x, #3x and icons for you in just one click. And also export to XCAssets file.
You can find it here: https://github.com/angelvasa/AVXCAssets-Generator
Hope this will help someone
If you do not provide 1x or 2x assets, and your app is run on a 1x or 2x device, it should downsample the 3x asset at runtime. This may look fine, but depending on the scaling method used, it may also look really bad, so make sure this is really what you want.
If a folder named *.imageset, and the contents in it is well organized, Xcode will actually recognize them as an image. So this is another way to do this: https://github.com/albert-zhang/gen_xcassets
This python script will quickly auto generate #2x version for all images in a folder.

Automate Saving for iPhone images in Photoshop

I have a dream script I'm looking for and wondering if anyone here as stumbled across one
Problem: Creating #2x and regular PNG files for iOS software
Edit: no need to worry about file type. iOS images should ALWAYS be 24bit PNG
In my workflow, I'll get my image all set then go through this same exact ritual every time:
Save for Web & Devices
Press Save and choose a filename, like "myimage#2x.png"
Save for Web & Devices again
Reduce image size by 50%
Press Save and choose a similar filename like "myimage.png"
My dream photoshop script would
1. Ask for a filename & location: i.e. present a typical save dialog
2. I'd enter a name "myimage"
3. it would save the current document as "myimage#2x" in that location, and then save a 50% reduced image named "myimage" also in that location
Any ideas? I've poked around the photoshop scripting reference but its a bit overwhelming.
Thanks!!
You could use photoshop Actions for that. You can found dozens of how-tos for that in google.
But i rather prefer to save all images just in retina with #2x and then load them all in the little and smart app called unretiner (Appstore link) to generate the lowers images.
Here is an action set I created (JLRetinaPNGExport.atn) which you can find here. This action set comes with 3 actions:
current layer export as .png at 100% then 50%
current layer, trim transparent pixels, then export as .png at 100% then 50%
merge visible and export as .png at 100% then 50%
This action set was modified from this action set. Hope this helps!

Delphi 2009 Application using Large Icons for Vista

I want to use Vista Large Icon feature in my Delphi 2009 application, but I can only embed the normal 32x32 icon in my application. How can I make application have many sizes of Icons?
Thanks
Go download IcoFX. It's free and handles multiple sizes/colour depths AND proper alpha blending. Use that to create your ICO file, then add the ICO to your project. Can't give you a blow-by-blow of the steps for loading the ICO in 2009, because I'm stuck using Delphi 7...
If it's any consolation, Visual Studio has taken eons to get anywhere near decent icon editing too.
Hey, who remembers the Borland Resource Workshop ?
I would use a icon editor such as AWIcons which allows you to create an icon that contains many different formats. Windows will then decide, based on the current view and color depth, which icon to use.
Once you have created your SINGLE icon with many different embedded formats, just link it like you would your 32x32 icon. It might look funny in the IDE, but when you run the program it will look correctly.
Get a decent stock of icons, or make your own. I use an the icon library from Icon Experience - your pay, but all icon sizes 16x16 up to 256 x 256 are provided in ICO and PNG formats. I then use Icon Sushi to work with my own icons. Delphi 7 and 2009 both have limitations working with large icons, so I've moved to using PNG icons using the PNG components library. This gives you a TPNGImageList that just works where the Vista cacheing and other problems make using TImageList only really good for 16x16 and 32x32 sizes. I've also ported PNGComponents to D2009 where it works fine.
Brian
I can only embed the normal 32x32 icon
in my application
From my experience, Delphi 2009 lets you use any icon. I've used extra large Vista icons too, and it worked.
Solution:
There is a BETTER AND EASY way to add high resolution icons in your Delphi 7 application.
It doesn't involve hacking your exe file:
http://thesunstroke.blogspot.com/2010/10/how-to-add-high-resolution-icons-to.html
If your are wanting some free software to create icons then you can probably use GIMP. My very first video tutorial was using GIMP to create icons - it's available here.
Configure the project to use the Microsoft resource compiler.
Once you are done building your project, add all the needed icons your project needs at the post-build step with the resource editor as described here: http://www.heaventools.com/rtconsole-sample-script-guide.htm

Resources