Images for Retina display - iphone

If i want my application to be compatible with the Retina display, am i obliged to recreate all my images by doubling their sizes? even the icon?

if you will not use high resolution images your images will look pixelated/blurr.So better to use high res images as well.Some Key points are:
Displaying graphics depending on the device model can be done by duplicating image files and adding an ‘#2x’ suffix. So, when the normal image file is named ‘button.png’, the hi-res version should be ‘button#2x.png’.
You don’t need any additional code for this. In Interface Builder or your code, assign the normal version (without the suffix) to an object. The same goes for the application icon. The resolution of the 2x icon should be 114 by 114 pixels. You will need to add a separate ‘Icon’ property in the Info.plist file for this icon.
If for some reason you do want to perform a check in your code, you can do so by checking the scale factor of the display. Older models will return a scale factor of 1.0, while the iPhone 4 will return 2.0. You can check this with:
float factor = [UIScreen mainScreen].scale;
Depending on the type of application you’re developing further optimizations can be made to utilize the new retina display the best you can.
A very good information here
hope it help you :)

You're not obligated, it just will look very pixelated if you don't.
As for the icon, I believe you are obligated to provide multiple sizes when submitting to the AppStore.

Maybe you'll want to take a look at iRetiner.
You could also check this previous stackoverflow thread : how to set image for ipad application that support retina display

A summary of the icons and what is required can be found in the human interface guidelines. I highly recommend providing high resolution artwork for the retina display even though it is not required. Your default now should be to design artwork at the higher resolution, then scale down for older devices. I doubt Apple would choose to highlight an application as new and noteworthy if it looks pixelated on the latest devices.

Related

Change TFT to Retina in iphone

There are people who insist that for changing design from TFT to Retina we should redesign all app.
But I have read that we can change only app's images ,and it's enough.
I want to know which is the best practice for it and which solution is acceptable??
Retina Display is just Apple's name for the high resolution display on some of its devices -- it's still a TFT (thin film transistor) LCD display, though.
The Retina Display has twice as many pixels in each direction as the non-Retina version. iOS features a mechanism for providing both high resolution and standard resolution images, so that the high-res versions will be used if needed. All you need to do is include high-res versions of your images with the same names and their standard-res counterparts and the "#2x" suffix. Of course, having that higher resolution available means that you might want to add detail to your images or otherwise redesign your app to take full advantage of the screen's capabilities, but it's not a requirement. In fact, you don't need to do anything at all -- your existing app will work just fine without any changes.
It depends on your app.
In many cases simply including the hi-res versions of your images will be all that you need to do.
However, if you have any custom drawing that could benefit from the extra resolution, then you'll need to considered updating that code too.

What size images should I use in order to support the two iphone resolutions?

I have a few questions about screen resolution, that I'm not clear on. These questions assume they my app will be running on iOS 4.0 and up, and on either iPhone 3GS or iPhone 4.
Should the size of the splash image (default.png) be (960x640) or (480x320)?
Should the size of the app icon (Icon.png) be (57x57) or (114x114)?
What about other graphics that I may use in my app, such a graphic that represents a button? Should I always create these images for the higher resolution, and have the app scale them down? In other words, if I want a button image to be displayed on the 3GS that is 200x40 - should I create the image at 400x80, so that iPhone 4 can take advantage of it?
Thanks!
A good guide to this can be found here: http://mobile.tutsplus.com/tutorials/iphone/preparing-your-iphone-app-for-higher-resolutions/
In general you just create 2 sets of images. Your original and then a new one twice as big with #2x in the name. So for image.png at size 32x32 you would have one that is twice the resolution called image#2x.png at size 64x64. In your app just always use the image.png in Interface Builder and when loading in code.
There is no need to detect the device. These images will automatically be picked up by the OS and subbed in as necessary.
Provide both sizes (960x640 & 480x320) for the splash image using the #2x method described above
Provide both icons (57x57 & 114x114) using the #2x method
For our apps we use a combination of the #2x images and just Scaling the large images. (More information on this can be found in the above article) We use the #2x images for bar buttons, icons, etc. But for UIImageViews we often just use the Scaling. There can be a performance hit for doing this, but for most apps I'd say this is negligible. The savings in file size sometimes make scaling the only option.
Related Questions:
Retina/non-retina images in UIImageView
Making an app Retina Display friendly
You need to provide both if you want them to look nice. For example,
Default.png -> (480x320)
Amd
Default#2x.png -> (960x640)

Making an app Retina Display friendly

I have an app and would like to make it retina display friendly.
How exactly does the process work? What images need to be added apart from what I have?
I know the sizes should be different, but am not sure on the details?
What else needs to be done to handle retina display?
Should the device be detected and use other images if the device supports retina display?
What if there are a lot of images? And how will this effect the app size?
Thanks
A good guide to this can be found here: http://mobile.tutsplus.com/tutorials/iphone/preparing-your-iphone-app-for-higher-resolutions/
In general you just create 2 sets of images. Your original and then a new one twice as big with #2x in the name. So for image.png at size 32x32 you would have one that is twice the resolution called image#2x.png at size 64x64. In your app just always use the image.png in Interface Builder and when loading in code.
There is no need to detect the device. These images will automatically be picked up by the OS and subbed in as necessary.
good articles if you're using sprites
http://weedygarden.net/2012/04/hi-res-retina-display-css-sprites/
The main thing about working with retina image is that image name convention.
And the size of image should be 2times greater than regular1.
Example- if your icon name for regular is icon.png then it should be icon#2x.png for
retina.And second thing is size for regular is 72*72 then it should be 144*144 for Retina.
It might be helpful for you.
Thnks

When I create an iphone window based app, how to tell interface builder create window for retina pixel size?

I hope to create an iphone window based app for retina screen?
But I found that the size of window in mainwindow.xib is fixed.
How to adjust it or there is any to tell interface builder create window for retina pixel size?
Welcome any comment
Thanks
interdev
There's no need to do anything in terms of the various components you layout in Interface Builder, as it's based around points, not pixels - and as all the iPhone screens sizes are the same in points no action is required.
In terms of any images you're loading, you will need to supply higher resolution (twice the pixel size) versions, but as long as these are named "[original name]#2x.[extension]" they'll simply work automatically.
For more information on the image naming, see the "Specifying High-Resolution Images in iOS" section of the Resource Programming Guide and if you want to delve a little deeper, there's a discussion on "Points Versus Pixels" within the Drawing and Printing Guide for iOS.
UPDATE - As of the iPhone 5, the iPhone screens are no longer all the same point size. :-)
The window will be automatically resized for you, you do need concern about the size of your image elements, since retina display uses a bigger size of resolution. You need name your images like this:
regular image name: myimage.png
retina image name: myimage#2x.png
When running in an iPhone4 your program will identify the token "#2x" and change the images for that kind of device.
Design your layout using the size of: 640x960 (double of the original: 320x480)
Good luck.

Application Launch High Res Image

In the apple docs it states
The portion is the
optional string #2x and should be
included only on images intended for
use on high-resolution screens
What are high-resolution screens? iPhone 4's? Do I need to include one?
I guess you missed the part where the iPhone 4 and it's double high resolution screen was introduced :-)
The iPhone 4 screen is 640 by 960.
To automatically take advantage of that you can provide graphics assets that have that #2x in the name.
When you use something like UIImage#imageNamed:, the OS will automatically use the high resolution image if appropriate.
It will also use those for the icons and launch screens if available.
They are all optional though. But I'm sure your users with an iPhone 4 will appreciate the high res artwork :-)