Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we just provide @2x images?

We know that we should provide normal size image and @2x size image for a iphone/ipad app. But providing double size for one image is a boring thing.

I've do some test, if there is only the @2x image, if needed, system will automatically shrink the @2x image to normal size. So in this situation, the none retina iphone/ipad won't look weird.

I'm wondering can we just provide @2x images and let system shrink them to get smaller ones ? And is it allowed by apple?

Thanks.

Edit:

I've realized it will cause memory issue on old device.

Thanks again.

like image 808
tangqiaoboy Avatar asked Mar 19 '12 08:03

tangqiaoboy


People also ask

What is the difference between 1x and 2x images?

1x vs 2x Graphics While the graphic will still display on the website at 640 pixels wide, you are doubling the pixel density by using an image that's double the size. 2x graphics are much sharper and richer than 1x graphics, which ensures users see a crisp graphic instead of one that's on the blurry side.

How do I make an image retina-ready?

To make your website retina-ready, use Scalable Vector Graphics (SVG) whenever possible. SVG is an XML-based graphic format that presents images in high quality. SVG images can be viewed in Internet browsers that use XML or be displayed on mobile phones in SVGB or SVGT file formats.

What does 2x mean in PNG?

2x graphics are twice the pixel width of 1x graphics, but don't think of them as bigger. They must occupy the same physical space, so the 2x pixels end up being smaller.


2 Answers

I don't think all Apple will reject your app. But it's not a good idea.

Since the non retina devices have less memory to work with, loading all these big images in memory could really make you app a memory hog. This could make your app crash on lowmemory warnings.

You can easily resize the @2x images to half there size with a simple automator script. There is no need to do it by hand if you really wan't to.

like image 82
rckoenes Avatar answered Oct 12 '22 14:10

rckoenes


Apple says you have to provide both. On guessing under what circumstance it is acceptable or not we can spent days — at the end it is like reading the cards, and some random Apple guy will decide on how he interpreted the guidelines.

If the task of shrinking the images manually is too boring for you, why don't you create a tool/script to do it automatically for you.

Your statement, that there is no increase of usage can't be true. The image data is stored in memory as raw data. with up to four bytes per pixel. Retina version images must use about 4 time more memory.

like image 38
vikingosegundo Avatar answered Oct 12 '22 16:10

vikingosegundo