Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I need @1x, @2x and @3x iOS images?

Why do we need these 3 particular image types?

If I have a button on my app with a background image say, 50 pixels x 50 pixels, why do I need 3 versions of this image? What's stopping me from just making one image that's much higher in res, say, 700x700 so when it shrinks down on any iPhone it won't fall under the max res the device would want?

Only thing I can think of is it just takes up more space, but for simple apps / a simple button it seems like it wouldn't cause any issues. I've tried it on a few devices and see no difference between them when I simulate it and do this method. However, as I dive more into apps and stuff I'm sure there is substance behind this technique.

like image 524
CodeMark22 Avatar asked Sep 02 '15 13:09

CodeMark22


People also ask

What are 1x and 2x images?

1x and 2x are just ways of defining an image that has a certain amount of pixel resolution. A 2x image has a higher resolution but has twice the width and height of a 1x image.

What is the difference between points and pixels on an iPhone?

Points are different to pixels because they change size based on DPI: On the iPhone, 1 point is equal to 1 pixel when the resolution is 163DPI. This was the case for all the iPhones before the Retina era. At 326DPI, like the iPhone 4, 5 and 6, 1 point is equal to 2 pixels across and 2 pixels down, or 4 total pixels.

What size image is best for iPhone?

Your iPhone uses a ratio of 3:4 by default, which means that if you wanted to print a 3 x 4 photo or a 6 x 8 photo, you could do it without any cropping at all.

What is 1x scale?

Scale factors A standard-resolution display has a 1:1 pixel density (also called @1x), where one pixel is equal to one point. High-resolution displays have a higher pixel density, such as 2:1 or 3:1.

What is the difference between 1x 2x and 3x image sizes?

By creating 2x and 3x images, you can't expect exact same layout from each iPhone screen. The layout will be different from screen to screen. 1x, 2x and 3x image sizes dealing with only the pixel density of the screen. Suppose you have an image which is 320 * 70 and you are creating This will be your output in different screens.

How do I convert an app image to 1x or 2x?

Hotpot.ai created a free, easy icon resizer to convert an app image into the 1x, 2x, and 3x sizes expected by Xcode. This service works with both normal app images and app icons alike.

What is the difference between image@2x and image@3x?

@enadun I just found the answer for that. Images at 1x, 2x and 3x should be given because while deploying the app from app store, image@2x images are sent on iphone 5 and its variants, image@3x images are sent on iphone 6 and its variants, etc. This is called app slicing.

Is there a way to upscale from @1x to @3x?

@3x or @2x can be upscaled from @1x but usually the visual result is blurry, with thick lines and doesn't look good. Upscaling @3x from @2x can be even worse because subpixels must be used.


1 Answers

If you don't have the exact size, there are two things that can happen:

Upscaling

@3x or @2x can be upscaled from @1x but usually the visual result is blurry, with thick lines and doesn't look good. Upscaling @3x from @2x can be even worse because subpixels must be used.

Downscaling

In general, the results are much better than with upscaling, however, that doesn't apply for all the images. If you have a 1px border on a @3x image, after downscaling it to @1x the border won't be visible (0.33px). The same applies for any small objects in the image. Downscaling destroys all details.

In general - for an image to look perfect, you want to avoid both downscaling and upscaling. You can always go with only @2x or @3x images and add other scales only if you see visual problems. Using higher resolution won't improve downscaling. High resolutions are used only to avoid upscaling. Downscaling from a high scale (e.g. @100x) to @1x won't create better results than downscaling from @3x.

like image 156
Sulthan Avatar answered Sep 16 '22 14:09

Sulthan