iPhone 6/6+ camera | size of taken photos? - ios

What is the size (in pixels) of a photo taken by iPhone 6/6+ cameras? Or where can I find any info about this? I need to setup GPUImageCameraView's frame size.

If you are referring to the physical pixels on the screen, the iPhone 6+ is 1080 x 1920, while the iPhone 6 is 750 x 1334.
If you are referring to screen size, the iPhone 6+ is 414 x 736 points, while the iPhone 6 is 375 x 667 points.
Hope this helps!

Related

#3x image, Iphone 8 Plus, Iphone X

Let's assume, I have selected 'View as: iPhone 8 Plus' on Main.storyboard in Xcode. We know these details:
Iphone X: 375 x 812 points (#3x) 1125x2436 pixels
Iphone 8 Plus: 414 x 736 points (#3x) 1242 × 2208 pixels
Iphone 8: 375 x 667 points (#2x) 750x1334 pixel
Let's assume I would like to put an UIImageView (top bar, header bar image) like below:
Remember, I have selected 'View as: iPhone 8 Plus'. So width of the image must be 414 points. And let's assume height of the image is 100 points. So image size must be 1242 x 300 pixels. (because 414points*3=1242px, 100points*3=300px)
so,
#3xBackground.png must be 1242 x 300 pixels.
#2xBackground.png must be 828x200, right? **(this is question 1)**
#1xBackground.png must be 414x100, right? **(this is question 2)**
What about IPhone X? Iphone X also uses #3xBackground.png image, right? (this is question3)
I see this image so sharp at iphone 8 plus. Because I create this image regarding to the iPhone 9 plus. But i can't see this image so sharp in iPhone x. Because width of iPhone X is 375points(1125 pixels) but my image width is 414 points(1242 pixels) Am i right? iphone x and iphone 8 plus use same image: #3xBackground.png. Device tries to put 1242pixel image in to 1125 px place. So how does this picture look so sharp?
Does Iphone X reduce height of the image when it puts 1242 pixel image in to 1125 px place ? (This is question 4) If reply yes. So it should be fine.

Iphone 5 - 6plus image size/resolutions?

I'm working on the graphics for an app that will run in portrait mode only for the iPhone 5 - 6 plus. The images should be the total width of the portrait screen. Based on this page:
http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions it looks as if my image widths should be as follows:
x = 640 pixels in width,
2x = 750 pixels in width,
3x = 1125 pixels in width
Does the above look correct?
When creating these images in Photoshop is it best to save them at 72 ppi?
Thank you for your assistance.
Not sure why your refer to them as "x", "2x" and "3x", but the screen widths (native for iPhone 4/5/6, virtual for 6 Plus) are:
640 pixels (iPhone 4/5)
750 pixels (iPhone 6)
1242 pixels (iPhone 6 Plus)
The ppi resolution doesn't matter if you set the sizes in pixels. It only matters if you set the size in cm, inches or similar length units. If you want to see them at their "real" size, you should select 326 ppi for iPhone 4/5/6 and 461 ppi for 6 Plus.

What pixel size do images need to at least fill the iPhone 6 Plus display?

The iPhone 6 Plus has 414 x 736 points. It renders at 3x to get 1242 x 2208 pixels, which are mapped to 1080 x 1920 of physical pixel.
Since the physical pixels are the pixels which are actually drawn and shown to the user, I guess that full screen images have to be at least 1080 x 1920 px to match the full screen potential. Each image which is bigger than that will be downscaled to 1080 x 1920 px.
Am I right that you need at least have full screen images in size 1080 x 1920 px to get the best resolution on an iPhone 6 Plus?
Do not confuse with 'mapped to physical size'. You just use 1242 x 2208 px size for you full screen images.
The screen bounds of iPhone6+ is;
NSLog("Screen Size \( UIScreen.mainScreen().bounds)"); // on iPhone 6+ - 414 x 736 (1x)
Which we are using in our development calculations so,
in development, there is no concept of physical screen size. it is handled by the device at its own.

simulate uiview bounds with physical size of iphone 6/ iphone 6 plus on ipad air(v1)

I want to create UIView with bounds that will be the same size as physical screen size of iphone6/iphone 6 plus, and run this in ipad air(v1)
Now, I read this info :
Size for iPhone 6 Plus with #3x scaling (Apple name: Retina HD 5.5),
Coordinate space: 414 x 736 points and 1242 x 2208 pixels, 401 ppi,
screen physical size is 2.7 x 4.8 in or 68 x 122 mm.
Size for iPhone 6 with #2x scaling (Apple name: Retina HD 4.7),
Coordinate space: 375 x 667 points and 750 x 1334 pixels, 326 ppi,
screen physical size is 2.3 x 4.1 in or 58 x 104 mm.
What is the correct bounds/coordinate space I need to set in my UIView that will show on the ipad, the physical screen size for iphone 6/iphone 6 plus ?
You should take coordinate space values as bound size for your view and align it as you want, for iphone 6+ it is 414 x 736 and for 6 it is 375 x 667.

iPhone 6 Plus resolution confusion: Xcode or Apple's website? for development

Apple's website claims that the resolution is 1080p: 1920 x 1080
However, the launch screen required by Xcode (8.0 GM launched today) is 2208 x 1242.
Who's right?
The iPhone 6+ renders internally using #3x assets at a virtual resolution of 2208×1242 (with 736x414 points), then samples that down for display. The same as using a scaled resolution on a Retina MacBook — it lets them hit an integral multiple for pixel assets while still having e.g. 12 pt text look the same size on the screen.
So, yes, the launch screens need to be that size.
The maths:
The 6, the 5s, the 5, the 4s and the 4 are all 326 pixels per inch, and use #2x assets to stick to the approximately 160 points per inch of all previous devices.
The 6+ is 401 pixels per inch. So it'd hypothetically need roughly #2.46x assets. Instead Apple uses #3x assets and scales the complete output down to about 84% of its natural size.
In practice Apple has decided to go with more like 87%, turning the 1080 into 1242. No doubt that was to find something as close as possible to 84% that still produced integral sizes in both directions — 1242/1080 = 2208/1920 exactly, whereas if you'd turned the 1080 into, say, 1286, you'd somehow need to render 2286.22 pixels vertically to scale well.
The answer is that older apps run in 2208 x 1242 Zoomed Mode. But when an app is built for the new phones the resolutions available are: Super Retina HD 5.8 (iPhone X) 1125 x 2436 (458ppi), Retina HD 5.5 (iPhone 6, 7, 8 Plus) 1242 x 2208 and Retina HD 4.7 (iPhone 6) 750 x 1334. This is causing the confusion mentioned in the question. To build apps that use the full screen size of the new phones add LaunchImages in the sizes: 1125 x 2436, 1242 x 2208, 2208 x 1242 and 750 x 1334.
Updated for the new iPhones 12, 12 mini, 12 Pro, 12 Pro Max
Size for iPhone 12 Pro Max with #3x scaling, coordinate space: 428 x 926 points and 1284 x 2778 pixels, 458 ppi, device physical size is 3.07 x 6.33 in or 78.1 x 160.8 mm. 6.7" Super Retina XDR display.
Size for iPhone 12 Pro with #3x scaling, coordinate space: 390 x 844 points and 1170 x 2532 pixels, 460 ppi, device physical size is 2.82 x 5.78 in or 71.5 x 146.7 mm. 6.1" Super Retina XDR display.
Size for iPhone 12 with #2x scaling, coordinate space: 585 x 1266 points and 1170 x 2532 pixels, 460 ppi, device physical size is 2.82 x 5.78 in or 71.5 x 146.7 mm. 6.1" Super Retina XDR display.
Size for iPhone 12 mini with #2x scaling, coordinate space: 540 x 1170 points and 1080 x 2340 pixels, 476 ppi, device physical size is 2.53 x 5.18 in or 64.2 x 131.5 mm. 5.4" Super Retina XDR display.
Size for iPhone 11 Pro Max with #3x scaling, coordinate space: 414 x 896 points and 1242 x 2688 pixels, 458 ppi, device physical size is 3.06 x 6.22 in or 77.8 x 158.0 mm. 6.5" Super Retina XDR display.
Size for iPhone 11 Pro with #3x scaling, coordinate space: 375 x 812 points and 1125 x 2436 pixels, 458 ppi, device physical size is 2.81 x 5.67 in or 71.4 x 144.0 mm. 5.8" Super Retina XDR display.
Size for iPhone 11 with #2x scaling, coordinate space: 414 x 896 points and 828 x 1792 pixels, 326 ppi, device physical size is 2.98 x 5.94 in or 75.7 x 150.9 mm. 6.1" Liquid Retina HD display.
Size for iPhone X🅂 Max with #3x scaling (Apple name: Super Retina HD 6.5 display"), coordinate space: 414 x 896 points and 1242 x 2688 pixels, 458 ppi, device physical size is 3.05 x 6.20 in or 77.4 x 157.5 mm.
let screen = UIScreen.main
print("Screen bounds: \(screen.bounds), Screen resolution: \(screen.nativeBounds), scale: \(screen.scale)")
//iPhone X🅂 Max Screen bounds: (0.0, 0.0, 414.0, 896.0), Screen resolution: (0.0, 0.0, 1242.0, 2688.0), scale: 3.0
Size for iPhone X🅁 with #2x scaling (Apple name: Super Retina HD 6.1" display), coordinate space: 414 x 896 points and 828 x 1792 pixels, 326 ppi, device physical size is 2.98 x 5.94 in or 75.7 x 150.9 mm.
let screen = UIScreen.main
print("Screen bounds: \(screen.bounds), Screen resolution: \(screen.nativeBounds), scale: \(screen.scale)")
//iPhone X🅁 Screen bounds: (0.0, 0.0, 414.0, 896.0), Screen resolution: (0.0, 0.0, 828.0, 1792.0), scale: 2.0
Size for iPhone X🅂 and iPhone X with #3x scaling (Apple name: Super Retina HD 5.8" display), coordinate space: 375 x 812 points and 1125 x 2436 pixels, 458 ppi, device physical size is 2.79 x 5.65 in or 70.9 x 143.6 mm.
let screen = UIScreen.main
print("Screen bounds: \(screen.bounds), Screen resolution: \(screen.nativeBounds), scale: \(screen.scale)")
//iPhone X🅂 and X Screen bounds: (0.0, 0.0, 375.0, 812.0), Screen resolution: (0.0, 0.0, 1125.0, 2436.0), scale: 3.0
Size for iPhone 6, 6S, 7 and 8 with #3x scaling (Apple name: Retina HD 5.5), coordinate space: 414 x 736 points and 1242 x 2208 pixels, 401 ppi, screen physical size is 2.7 x 4.8 in or 68 x 122 mm. When running in Zoomed Mode, i.e. without the new LaunchImages or choosen in Setup on iPhone 6 Plus, the native scale is 2.88 and the screen is 320 x 568 points, which is the iPhone 5 native size:
Screen bounds: {{0, 0}, {414, 736}}, Screen resolution: <UIScreen: 0x7f97fad330b0; bounds = {{0, 0}, {414, 736}};
mode = <UIScreenMode: 0x7f97fae1ce00; size = 1242.000000 x 2208.000000>>, scale: 3.000000, nativeScale: 3.000000
Size for iPhone 6 and iPhone 6S with #2x scaling (Apple name: Retina HD 4.7), coordinate space: 375 x 667 points and 750 x 1334 pixels, 326 ppi, screen physical size is 2.3 x 4.1 in or 58 x 104 mm. When running in Zoomed Mode, i.e. without the new LaunchImages, the screen is 320 x 568 points, which is the iPhone 5 native size:
Screen bounds: {{0, 0}, {375, 667}}, Screen resolution: <UIScreen: 0x7fa01b5182d0; bounds = {{0, 0}, {375, 667}};
mode = <UIScreenMode: 0x7fa01b711760; size = 750.000000 x 1334.000000>>, scale: 2.000000, nativeScale: 2.000000
And iPhone 5 for comparison is 640 x 1136, iPhone 4 640 x 960.
Here is the code I used to check this out (note that nativeScale only runs on iOS 8):
UIScreen *mainScreen = [UIScreen mainScreen];
NSLog(#"Screen bounds: %#, Screen resolution: %#, scale: %f, nativeScale: %f",
NSStringFromCGRect(mainScreen.bounds), mainScreen.coordinateSpace, mainScreen.scale, mainScreen.nativeScale);
Note: Upload LaunchImages otherwise the app will run in Zoomed Mode and not show the correct scaling, or screen sizes. In Zoomed Mode the nativeScale and scale will not be the same. On an actual device the scale can be 2.608 on the iPhone 6 Plus, even when it is not running in Zoomed Mode, but it will show scale of 3.0 when running on the simulator.
Real/physical iPhone 6 Plus resolution is 1920x1080 but in Xcode you make your interface for 2208x1242 resolution (736x414 points) and on device it is automatically scaled down to 1920x1080 pixels.
iPhone resolutions quick reference:
Device Points Log. Res. Sc. Real Res. PPI Ratio Size
iPhone 12 Pro Max, 13 Pro Max 926x428 2778x1284 3x 2778x1284 458 19.5:9 6.7"
iPhone 12, 12 Pro, 13, 13 Pro 844x390 2532x1170 3x 2532x1170 460 19.5:9 6.1"
iPhone 12 mini, 13 mini 812x375 2436x1125 3x 2340x1080 476 19.5:9 5.4"
iPhone XS Max, 11 Pro Max 896x414 2688x1242 3x 2688x1242 458 19.5:9 6.5"
iPhone XR, 11 896x414 1792x828 2x 1792x828 326 19.5:9 6.1"
iPhone X, XS, 11 Pro 812x375 2436x1125 3x 2436x1125 458 19.5:9 5.8"
iPhone 6+, 6S+, 7+, 8+ 736x414 2208x1242 3x 1920x1080 401 16:9 5.5"
iPhone 6, 6S, 7, 8, SE2 667x375 1334x750 2x 1334x750 326 16:9 4.7"
iPhone 5, 5S, 5C, SE1 568x320 1136x640 2x 1136x640 326 16:9 4.0"
iPhone 4, 4S 480x320 960x640 2x 960x640 326 3:2 3.5"
iPhone 3GS 480x320 480x320 1x 480x320 163 3:2 3.5"
You should probably stop using launch images in iOS 8 and use a storyboard or nib/xib.
In Xcode 6, open the File menu and choose New ⟶ File... ⟶ iOS ⟶ User Interface ⟶ Launch Screen.
Then open the settings for your project by clicking on it.
In the General tab, in the section called App Icons and Launch Images, set the Launch Screen File to the files you just created (this will set UILaunchStoryboardName in info.plist).
Note that for the time being the simulator will only show a black screen, so you need to test on a real device.
Adding a Launch Screen xib file to your project:
Configuring your project to use the Launch Screen xib file instead of the Asset Catalog:
On the physical device, iPhone 6 Plus's main screen's bounds is 2208x1242 and nativeBounds is 1920x1080. There is hardware scaling involved to resize to the physical display.
On the simulator, the iPhone 6 Plus's main screen's bounds and nativeBounds are both 2208x1242.
In other words... Videos, OpenGL, and other things based on CALayers that deal with pixels will deal with the real 1920x1080 frame buffer on device (or 2208x1242 on sim). Things dealing with points in UIKit will be deal with the 2208x1242 (x3) bounds and get scaled as appropriate on device.
The simulator does not have access to the same hardware that is doing the scaling on device and there's not really much of a benefit to simulating it in software as they'd produce different results than the hardware. Thus it makes sense to set the nativeBounds of a simulated device's main screen to the bounds of the physical device's main screen.
iOS 8 added API to UIScreen (nativeScale and nativeBounds) to let a developer determine the resolution of the CADisplay corresponding to the UIScreen.
For those like me who wonder how legacy apps are treated, I did a bit of testing and computation on the subject.
Thanks to #hannes-sverrisson hint, I started on the assumption that a legacy app is treated with a 320x568 view in iPhone 6 and iPhone 6 plus.
The test was made with a simple black background bg#2x.png with a white border. The background has a size of 640x1136 pixels, and it is black with an inner white border of 1 pixel.
Below are the screenshots provided by the simulator:
iPhone 5 simulator : http://i.stack.imgur.com/b2E5K.png
iPhone 6 simulator : http://i.stack.imgur.com/4Qz8N.png
iPhone 6 plus simulator : http://i.stack.imgur.com/hQisc.png
On the iPhone 6 screenshot, we can see a 1 pixel margin on top and bottom of the white border, and a 2 pixel margin on the iPhone 6 plus screenshot. This gives us a used space of 1242x2204 on iPhone 6 plus, instead of 1242x2208, and 750x1332 on the iPhone 6, instead of 750x1334.
We can assume that those dead pixels are meant to respect the iPhone 5 aspect ratio:
iPhone 5 640 / 1136 = 0.5634
iPhone 6 (used) 750 / 1332 = 0.5631
iPhone 6 (real) 750 / 1334 = 0.5622
iPhone 6 plus (used) 1242 / 2204 = 0.5635
iPhone 6 plus (real) 1242 / 2208 = 0.5625
Second, it is important to know that #2x resources will be scaled not only on iPhone 6 plus (which expects #3x assets), but also on iPhone 6. This is probably because not scaling the resources would have led to unexpected layouts, due to the enlargement of the view.
However, that scaling is not equivalent in width and height. I tried it with a 264x264 #2x resource. Given the results, I have to assume that the scaling is directly proportional to the pixels / points ratio.
Device Width scale Computed width Screenshot width
iPhone 5 640 / 640 = 1.0 264 px
iPhone 6 750 / 640 = 1.171875 309.375 309 px
iPhone 6 plus 1242 / 640 = 1.940625 512.325 512 px
Device Height scale Computed height Screenshot height
iPhone 5 1136 / 1136 = 1.0 264 px
iPhone 6 1332 / 1136 = 1.172535 309.549 310 px
iPhone 6 plus 2204 / 1136 = 1.940141 512.197 512 px
It's important to note the iPhone 6 scaling is not the same in width and height (309x310). This tends to confirm the above theory that scaling is not proportional in width and height, but uses the pixels / points ratio.
I hope this helps.
Check out this infographic: http://www.paintcodeapp.com/news/iphone-6-screens-demystified
It explains the differences between old iPhones, iPhone 6 and iPhone 6 Plus. You can see comparison of screen sizes in points, rendered pixels and physical pixels. You will also find answer to your question there:
iPhone 6 Plus - with Retina display HD. Scaling factor is 3 and the image is afterwards downscaled from rendered 2208 × 1242 pixels to 1920 × 1080 pixels.
The downscaling ratio is 1920 / 2208 = 1080 / 1242 = 20 / 23. That means every 23 pixels from the original render have to be mapped to 20 physical pixels. In other words the image is scaled down to approximately 87% of its original size.
Update:
There is an updated version of infographic mentioned above. It contains more detailed info about screen resolution differences and it covers all iPhone models so far, including 4 inch devices.
http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions
Even if I don't generally like the tone of John Gruber's Daring Fireball blog, his Larger iPhone Display Conjecture is well worth the read.
He guessed but got exactly right both the resolution in points and in pixels for both models, except that he did not (me neither) expect Apple to build a smaller resolution physical display and scale down (details are in #Tommy's answer).
The gist of it all is that one should stop thinking in terms of pixels and start thinking in terms of points (this has been the case for quite some time, it's not a recent invention) and resulting physical size of UI elements. In short, both new iPhone models improve in this regard as physically most elements remain the same size, you can just fit more of them on the screen (for each bigger screen you can fit more).
I'm just slightly disappointed they haven't kept mapping of internal resolution to actual screen resolution 1:1 for the bigger model.

Resources