How to Sharpen Images for iPhone Usage - ios

I have some images that i want to use on my iphone application. The problem is i think that the resolution is not right cause its not sharp at all when see it on the device. This is how it looks when i zoom in a bit on it:
The idea is to use this image as an image for a UITabBarItem.
Any help and general advice on how to make it sharper & better etc.. or how to make images for iPhone devices and make #2x, #3x etc??
Thank you

The tab bar icon size will be displayed about 25 x 25 point. (maximum: 48 x 32)
What does it mean?
Assume, you would like to use an watch.pngas the tabBar icon.
So you need three icon to achieve it:
watch.png -> 25 x 25 pixel (for iPhone without retina display)
watch#2x.png -> 50 x 50 pixel ((maximum: 96 x 64 - for iPhone 6, 5, 5s)
watch#3x.png -> 75 x 75 pixel (maximum: 144 x 96 - for iPhone 6 Plus)
For more details see [Human Interface Design]
Of course, you need a vector graphic image to achieve it and export it in the 3 size. A designer should know the details.
Or you can buy some icons (/download some free icons) in your topic. Several flat icon set are available, e.g.:
www.flaticon.com
http://www.pixeden.com/free-icons-set

Related

What is Application icon size (83.5x83.5) for iOS?

In my Delphi Rio iOS project, when I go to Project options > Icons > Ipad I can see Application icon (83.5x83.5) but what does it mean 83.5x83.5? It's not possible to make an image of 83.5x83.5 pixels, so what is the desired pixel size?
When I look the dimension of C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\Artwork\iOS\iPad\FM_ApplicationIcon_83.5x83.5.png
It is 83 x 83 pixels, not 83.5 x 83.5
Is there something wrong?
That is supposed to be iPad Pro icon for #1 scale. But iPad Pro does not have #1 scale, only #2 so this icon size is redundant in Delphi configuration - you can use 83 pixel size to keep Delphi side happy.
Real icon size for iPad Pro will be 83.5 * 2 = 167 pixels - and that size is supported by Delphi.

What can possible cause image look ugly in tab bar iOS?

I have 2 images.
The first one (#2x: 50x50, 72 pixels/ inches) is like this:
It look so ugly in Tab Bar:
The second one (#2x: 48x42, 72 pixels/inches) is like this:
Even it is smaller, it look good in Tab Bar:
I cannot see the different between the 2 images. Can you see and tell me why? I'm new in designing images for iphone. How can I design good image for tab bar? Here you can download the images.
Now you can set that image size according to the devices you are using
Tab bar icon (optional)
iPhone 6 Plus (#3x)
About 75 x 75 (maximum: 144 x 96)
iPhone 6 and iPhone 5
(#2x) About 50 x 50 (maximum: 96 x 64)
iPhone 4s (#2x)
About 50 x 50 (maximum: 96 x 64)
iPad and iPad mini (#2x)
About 50 x 50 (maximum: 96 x 64)
iPad 2 and iPad mini (#1x)
About 25 x 25 (maximum: 48 x 32)
According to the screenshot, I am suspecting image size.
I can't tell the exact reason why because never seen document regarding that found yet.
But in the practical experience those somewhat "distort" border problem happens when the image size and the control size are different even it has 1 pixel differences.
For example,
My UIImageView size is 32x 50, and my #2x image file for that imageView is 64 x 101. This can be cases because when we slice down, original image can have this pixel differences and we keep it for aspect ratio.
In this case, the size can be said 32 x 50.5 which is actually a bit difference and then, the image is showing "distort" or "blur" at it's border
Solution is just change it's image size as required.
After hours of researching finally I found out the reason. It's so silly of myself but I have to post this with hope that it will save time for other iOS developers who also want to design their own app:
Basically when exporting images to be used inside your app, your need to export with with PNG-24 type. That's all. (See image below as an example).

UIBarButtonItem image appears pixelated

In my IOS app, I'm trying to incorporate images on UIBarButtonItems. I found some icons on IconFinder, but they appear pixelated when I specify the image using the Storyboard (I exported 22x22 pixel pngs).
It appears fine in the storyboard but pixelated on my device / in the simulator:
How can you ensure that UIBarButtonItem images are not pixelated? I've read that they should be 22x22.
They should be 22 x 22 points. You are dealing with pixels.
You need an #2x image that is 44 x 44 as well as an #3x image that's 66 x 66 if you're optimizing for iPhone 6 Plus.
Here's a helpful link about the difference between points and pixels

Sizing of Images and Retina Displays

Quick question.
If designing an image for a UINavigationBar do I simply design one image 320 x 64 px and then scale accordingly? So:
320 x 64 for iPhone
640 x 128 for iPhone 4/5 (and add the #2x)
960 x 192 for iPhone 6 (and add the #3x)
Something which is confusing me is the various display sizes and how large to make the images:
I've think I've got the display resolutions correct as:
iPhone 320 x 480
iPhone 4 as 640 x 960
iPhone 5 as 640 x 1334
iPhone 6 as 750 x 1334
iPhone 6 Plus as 1242 x 2208
If I don't just create one image and scale it up, do I have to create 3 images for each phone?
e.g. iPhone 4:
640 x 128 for Standard
1280 x 256 for #2x
1920 x 384 for #3x.
And then the same for all the other phones?
I'm sure that can't be correct, but somewhat confused about this at the moment.
Thanks in advance for any help.
I would not recommend scaling an image up, as this will result in a marked loss of graphical fidelity (aka. 'jaggies' or blurriness) on higher resolution devices. If anything, you should err on the side of scaling down.
Your options:
Design images for each logical coordinate space. For a navigation bar, for example, this would entail having bar backgrounds in standard, 2x and 3x sizes. More, if you wish to support navigation bars in landscape mode on an iPhone.
Note, however, there is no guarantee how wide devices even within
the same logical coordinate space (ie. iPhone 5s and iPhone 6) will display a
navigation bar, so you will probably want to use the UIImage method
resizableImageWithCapInsets: to create an image that stretches all the way across the navigation bar no matter how wide it is.
https://developer.apple.com/library/ios/documentation/uikit/reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets:
It's worth noting that if you're writing for the iPhone you could probably forgo the use of 1x images as no iPhones that use 1x images are supported any longer. On iPad, though, you still have to contend with the iPad 2 and original iPad mini.
Create a 3x image and use it for everything. Allow iOS to automatically scale it down as needed. This could introduce some graphical flaws (although not nearly as bad as scaling up, and possibly not even noticeable) and is a bit less efficient - ie. it consumes more memory and theoretically could take longer to load. This is somewhat inelegant and I wouldn't recommend it.
Your last option is to embrace the flat design principles in place since iOS 7 and simply forgo the use of detailed/textured elements when possible. As the sizes and densities of iOS device displays increase, you may find that this results in fewer headaches for both you and your designer - and it might fit better with the iOS 7+ design aesthetic.
Another thing...
I'd recommend learning about the different between points and pixels. This will help get your head around a lot of this.
https://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7
Basically, you don't need to design for different phones, you need to design around 3 (well, really 2 at this point) logical coordinate spaces. Through the use of resizable images as described above and - optionally - creating larger images to fill up more space on larger devices, you shouldn't really have to create more than 2-3 versions of any image.

Launch image manager for iOS

Table 5-4 (about half way down) this Apple doc page suggests sizes for the launch images for iOS:
Device Portrait Landscape
iPhone and iPod touch 320 x 480 pixels Not supported
640 x 960 pixels (#2x)
iPhone 5 640 x 1136 pixels (#2x) Not supported
iPad 768 x 1024 pixels 1024 x 768 pixels
1536 x 2048 pixels (#2x) 2048 x 1536 pixels (#2x)
My app has a photo background at launch so at present I have to use GIMP to crop/resize the photo for each of these, which is fiddly.
Is there a tool to do this automatically ?
One other complication is that there are a couple of logos in the image too, ideally they will be in separate layers, so they can stay legible and tidily laid out for each size/orientation.
There is not a tool that I know of do do this. But there is a button in the Xcode Organizer, under Screenshots, labeled “Save as Launch Image”. If you set up your code to dynamically generate the image you want, you can run your app on various devices and grab images of it running, and then use those images as your launch images. You may have to modify them a little bit, but it’s certainly easier than creating each one from scratch.

Resources