
The Curious Case of iPhone 6+ 1080p Display - jameshuynh
https://medium.com/@brucewangsg/the-curious-case-of-iphone-6-1080p-display-b33dac5bbcb6
======
kllrnohj
Just... no. So very no.

Apple cheats because they failed to build a true density independent UI
toolkit that actually works. Thus you end up with hacks like this where the UI
is in a permanent state of filtered hell because the UI toolkit is just
broken.

Android has proved this can work, and work _fantastically_. The article tries
to spin it as being broken somehow, but clearly they never actually worked
with Android much because this all works so, so well.

You don't need whole multipliers when you work in DIPs instead of PX.

~~~
interpol_p
As the sibling comment states, iOS has used logical points from the very first
retina device. And even before then it has never used integers for its UI
toolkit coordinate system — there was always the support for fractional
coordinates.

The point of the article is that the iPhone 6+ renders to a larger offscreen
buffer and then downscales to a 1080p panel. This is the same as the higher
resolution modes on Retina Macbook Pros.

~~~
mirsadm
I haven't developed on iOS in a while so I'm not sure what the state of
layouts is at the moment. Why would they render to a higher resolution than
scale down if the UI can work with the new native resolution? It doesn't make
sense because the output will be worse and a hit to the battery life.

~~~
interpol_p
By rendering to a larger buffer they can ensure that any raster assets may use
an integer scale factor between devices. If they rendered to the panel's
native resolution (1080p) they'd probably have to use a 2.5x scale factor,
which is not desirable.

The output will be slightly worse, but at 400 PPI you probably won't be able
to tell without a magnifying glass. The current Retina MBPs do this in their
higher res modes and it's pretty hard to notice.

On battery life: perhaps the tradeoff of using a 1080 panel outweighs the
scaling.

Also it leaves the door open to switch to a full resolution native panel in an
iPhone 7+ with no hit to existing apps or developers.

~~~
Geee
Huh, I don't know _that_ much about GPU's, but surely they can render
fractional pixels directly without downscaling shenanigans. Which actually
means that GPU will convert full pixel values to fractional _before_
rendering. Rendering to a larger buffer and then downscaling is actually a
form of antialiasing, albeit an inefficient one (if I'm not wrong). Also,
rendering without antialias would result in rounded full pixel values.
Obviously, bitmaps will be downscaled on the GPU using whatever filters are
set for them (just like before, if bitmap is larger than the target size).

~~~
interpol_p
It's not so much about the GPU rendering fractional pixels, it's that it makes
it much trickier to create neat assets that work at non-integer scale factors.
Generally you want to ensure your raster assets have details that lie on
integer boundaries at all scale factors, throwing in a non-integer scale
factor as a target makes it more difficult to do that.

------
bsaul
As an ios dev, i know autolayout exists and lets you somehow manage the
different resolutions if you manage to change your set of mind ( no more
.frame = or .center= to change the location of a view dynamically but update
constraints instead), and get away with the ugliest thing in the ios api that
are constraint string expressions ( which almost made me throw up the first
time i saw them).

But let's face it, that's one less thing we can mock Android devs about. Pixel
perfect Wysiwyg ui building in interface builder has one foot in the grave.

~~~
dep_b
It's really time to dump those code views son. Interface Builder gives you all
the tools you need to do it and works reliable, gives a LOT of feedback on
your constraints when you build them.

You should learn auto layouts using Interface Builders, otherwise it's a
nightmare because you're not getting the feedback you need to learn it right
in the first place.

You need to start using priorities right, specially when you are doing >=, <=
constraints you also need to add a low prio == constraint. It's not that hard,
but you will be really frustrated if you keep clinging on to your coded views.

Try to chop up your Storyboards if you work in teams. They shouldn't be so big
that you have trouble following the flow on one monitor.

~~~
duaneb
You can't code review storyboards.

~~~
cerberusss
Why not? You can simply open a storyboard and review it, no?

~~~
duaneb
That requires downloading, checking it out (at the exclusion of your other
branches), reviewing it, figuring out how to make comments on it even though
there's no review interface for storyboards, rinse repeat. Code review in
objective-c is commenting on code in github while code compiles and evaluating
screenshots of the current state. If apple came out with a way to review
storyboards on something as convenient of github, I might consider it.

------
guelo
He glosses over the 6's resolution of 750x1334 vs the 5's 640x1136. Will 2x
image assets be slightly blown up for the bigger screen? And what about the
very slightly thinner aspect ratio?

As for "downsampling" of new 3x assets, the main image processing artifact to
look out for is moire which happens to images with small repeated details.
There are techniques to mitigate these artifacts but it will have to be a very
smart algorithm to avoid artifacts in all cases.

OTOH, Android seems to have no problem handling small resizings of images
within their size buckets system.

~~~
seanmcdirmid
The iPhone 6 remains at 2X, just with more virtual pixels to work with.

My grock of the article is that there will be artifacts, its just that they
are difficult to notice at that pixel density.

------
serve_yay
This write-up (also on the front page currently) is a lot simpler and focuses
more on the actual dimensions, instead of frankly half-baked marketing
analysis. [http://www.paintcodeapp.com/news/iphone-6-screens-
demystifie...](http://www.paintcodeapp.com/news/iphone-6-screens-demystified)

~~~
Dylan16807
Thank you. I was so confused about where the number 1242 came from. The number
414 isn't in the entire article.

~~~
venaoy
That's because the author made a calculation mistake. He wrote "412" instead
of "414".

~~~
Dylan16807
Even so the base number doesn't show up until most of the way through the
lengthy article, with no explanation. Even after reading all those words I
didn't understand the critical fact that there was a base size in dots that
was different for each model. Everything before was 320 or a multiple.

------
veidr
As an end user, I'm a fan of Apple's 'scaled resolution' solution. My Apple
notebook renders the screen in memory at 3840 x 2160 and then scales that to
fit the 2880 x 1800 physical display. The benefit of this approach is that you
can smoothly scale the UI to suit your age/eyesight.

When working, I keep mine set to smallest/most-information setting available
by default (dubbed "Looks like 1920x1200"), but when relaxing I often give my
tired 40-year-old eyes a break by bumping it down to "Looks like 1680 x 1050"
and making everything uniformly bigger and easier to read.

When you look closely, of course it doesn't look as good as an exact match to
the display native resolution does, but it looks pretty great. I think it will
look even better on the 401ppi iPhone 6+ display, and the increasingly high-
res screens of the future.

Tying logical display resolution to actual physical pixel resolution is pretty
💡🙉 at this point.

~~~
mbq
Reasonable UI systems and not-overdesigned programs respect your UI font size
setting and scale the rest accordingly, while equal resolutions allow hinting
to do its job and produce a sharp output in an intelligent way. The brute-
force approach of densifying monitors is a dirty hack and luckily doesn't
scale at all.

~~~
veidr
I understand your position, but I don't agree with it at all.

"Reasonable" and "not-overdesigned" are rarely concerns that last into the
future. And I don't think they even hold up given today's (high-end)
technology.

Why on earth would font size be the arbiter of anything other than font size?
Some programs don't even display text.

Logically, it makes a lot more sense to scale the entire display (or, sure,
subsets of it). That's still technically challenging for some of today's
systems, but not all of them. And it will be a vanishingly small number of
them as we move into the future.

------
Tepix
Apple is losing its advantage over Android regarding market fragmentation.

An iOS developer has to support _eight_ different screens these days to cover
all devices that will run iOS8:

* iPad 2

* iPad mini (the last non retina devices, same resolution, different DPI)

* iPhone 4S

* iPhone 5/5C/5S/iPod Touch 5th gen

* iPhone 6

* iPhone 6 Plus

* iPad 3/4/Air

* iPad Mini Retina (again, same resolution, different DPI)

Many devs will ignore the DPI differences between the iPad and the iPad mini,
but that isn't ideal. I think the iPhone 6 Plus should have had a 1600x900
display to keep the DPI in line with the previous phones, however Apple was
probably afraid to be compared unfavorably to the Android phones that have
1080p panels.

~~~
coldtea
> _Apple is losing its advantage over Android regarding market fragmentation._

Android has 5000 devices, differing OS versions (half of the devices out there
use a 2 to 3 year old OS), and differing hardware capabilities (including
different qualities in stuff like sensors, some of them even being nearly
useless).

And Apple is losing to that because it has "8 different" screens?

For one, you can support most of them (all iPads for example) with the exact
same code plus 2 sets of bitmap assets: normal and 2x.

As for the iPhones, they transitioned without a hitch to 5 taller display, and
the same will happen to 6/6+.

~~~
untog
_differing OS versions (half of the devices out there use a 2 to 3 year old
OS)_

That stat is pretty out of date by now. Android <= 2 now only accounts for 12%
of devices, and most app devs aren't targeting it any more.

And Android might have 5000 devices, but it doesn't have 5000 screen sizes.
Still more than Apple has, but hardly 4992 more.

[http://www.androidheadlines.com/2014/09/androids-kitkat-
clos...](http://www.androidheadlines.com/2014/09/androids-kitkat-closing-gap-
jelly-bean-overall-android-device-usage-september.html)

~~~
kstenerud
Indeed. For the modern Android dev, there aren't that many aspect ratios that
you really need to support.

Most modern phones are 16:9 (720, 960, 1080). There are still a few stragglers
(Motorola in particular), but they're becoming a thing of the past.

You basically have three aspect ratios to worry about right now: 16:9, 5:3,
and Motorola's 427:240.

With iOS, you have 3:2, 4:3, 71:40 (iPhone 5), and now these new iPhone 6
internal aspect ratios that get hardware resampled.

~~~
coldtea
Actually 71/40 and "these new iPhone 6 internal aspect ratios" are just the
same thing.

So, it all boils down to: 4:3 (all iPads) and 1.177 (5, 5S, 5C, 6, 6+).

3:2 is just a legacy ratio that will go away going forward as the 4S gets
older. It's not a ratio they have produced iPhones with for several years now.

------
forrestthewoods
Another possibility for the lower res is perf. I think it's quite possible the
6+ will have the worst per pixel perf of any modern iOS device. In the
conference they, I believe, bragged ~38% more pixels on the 6 and 170% more in
the 6+. But the GPU is only 50% faster!

The iPhone 4 and ipad3 both suffered seriously by having 4x the pixels as
their predecessor but only 2x the GPU. Mostly games suffered but it's still an
issue elsewhere with fancy animations, transparency, etc.

But this is all speculatory theorycrafting at this point

~~~
mirsadm
The performance should be comparable to the iPad. They share the same SOC.

~~~
forrestthewoods
...no? 6 and 6+ are both A8. 5s, Ipad air and mini retina are a7. I believe
air is clocked slightly higher tha 5s, 1.3ghz vs 1.2.

I think without question the 6+ will have worse per pixel perf than the 6. It
would be even more worse if the screen were even more higher res.

That's not enough to make or break anything. But it's got to be another
consideration.

~~~
mirsadm
Yes they do share the exact same SOC on the current iPhone/iPad (as mentioned
below). They will almost certainly share the same SOC with the new iPad. So
yes whilst the iPhone 6 will have better performance than the 6+, it won't
matter because the 6+ will be comparable to the iPad.

Happy?

------
TheCoreh
So it's essentially the same thing as the "Scaled" display modes of the Retina
MacBook Pro. An interesting approach.

------
devindotcom
A simpler way to explain this is that for the iPhone 6, it really is a
slightly larger iPhone 5 screen, like if you were moving from an 11" MacBook
Air to a 13" one. But for the iPhone 6+, it's like moving from that 13" one to
a 15" Retina MBP. And as we all know, the Retina Macbooks render at a higher
internal resolution and then scale it down to the native one.

I do appreciate the technical explanation, but as Apple has done this before,
for a quick explanation it's sufficient to point to the rMBP precedent.

~~~
mpweiher
> And as we all know, the Retina Macbooks render at a higher internal
> resolution and then scale it down to the native one.

I don't know that. Unless you're talking about scaled modes, which do
resampling, the retina models render at the native resolution. They will scale
apps by 2x that are not capable of rendering at the native resolution (not
many).

------
0x0
What would happen if you tried to draw a fullscreen 1:1 pixel tiled
checkerboard pattern?

~~~
anon4
Well if it's using 3x scaling, then writing one pixel will write a 3x3 block
on a 1242x2208 buffer that gets downscaled to 1080x1920 yielding a result like
this [https://imgur.com/ZsJKxzV](https://imgur.com/ZsJKxzV)

~~~
0x0
Hmm, what if the checkerboard pattern is at 1:1 (1x1 blocks)?

~~~
cncool
Depends on which downscaling algorithm(s) they use

------
bvrlt
This really needs a TLDR.

~~~
lucozade
Retina displays have 2 physical pixels per logical pixel. The 6+ has 3x.
However, the screen resolution isn't quite high enough for that so there is
hardware downsampling. The author thinks that it'll look ok though.

~~~
idlewords
God bless you

------
abyx
Am I the only one that noticed the iPhone on the left is actually a 5s and not
a 6?

------
shurcooL
Very interesting approach. Like others said, the best way to describe is like
using the higher resolution (scaled) mode on a Retina MBP.

I wanted to share pxcalc [1] for anyone doing DPI/PPI calculations, please be
aware it exists (and it's awesome).

[1] [http://pxcalc.com/](http://pxcalc.com/)

------
lutusp
Quote: "Calculating diagonal pixel is easy, following this formula:
SquareRoot(w x w + h x h)."

Gee -- what's wrong with y = √(w² + h²)? It's much easier to interpret.

~~~
asadotzler
maybe because you can't easily type that into a calculator like the one in
Spotlight or google.com?

~~~
lutusp
Fair enough, in that case:

y = sqrt(w^2 + h^2)

------
barrystaes
It not that they had a bright moment when going for a normal (power of two)
resolution, its just that they have not done so up until now. And nobody
except Apple used those technically suboptimal resolutions in mobile phones,
with good reason..

------
2mur
Anybody know what window.devicePixelRatio will report on the 6+?

Raster-based pixel manipulation applications suck in this brave new hidpi
world!

------
sarunw
In article he mentioned 1242px by 2208px with 462ppi as 3x of 163ppi (original
iPhone). Shouldn't it be 489ppi ?

Really confusing.

~~~
venaoy
Yep, another error. He also wrote 412px instead of 414px in some other
location.

~~~
sarunw
Not quite an error (the calculation is correct). It just don't make sense for
me why Apple come up with this magic 462ppi instead of 489ppi.

------
bsimpson
Is DPI really a term in the iOS community? I thought DPI was a holdover from
the print-era, and the politically-correct term was PPI (pixels-per-inch - not
"physical" pixels per inch).

I've heard 1x pixels called "device-independent pixels", "CSS pixels", and
"points"; but I've never seriously heard the term "device-pixels-per-inch"
until this article.

~~~
Tepix
Everyone uses the term DPI for displays even if the correct term is PPI. It's
not worth fighting about...

~~~
bsimpson
I don't mind people using the term DPI. The part that confused me is that the
OP is drawing a distinction between them.

In my mind DPI == "dots per inch", PPI == "pixels per inch", and they measure
the same thing (although some people frown upon using DPI in a digital
context). The author redefines them to mean "device pixels per inch" and
"physical pixels per inch", where PPI / devicePixelRatio == DPI. I wasn't sure
if that's an OP-thing or an iOS thing.

------
QuadDamaged
I haven't had the time to look at the docs but shall I start shipping art
assets as foo@3x.png ?

~~~
kalleboo
Yep. Xcode has also added 3x slots to xcassets files.

------
jokoon
I don't understand how such high PPI really matter at all. I mean it increases
battery usage, it costs more, and all you get is smoother text and smoother
pictures on a less than 5 inch screen.

~~~
Keyframe
For one, at 800dpi or so aliasing problems go away. With that kind of density,
I presume, race for density will be done.

~~~
chadgeidel
I had always heard it's in the 300 range. Phil Plait did an analysis back in
the day using "display held one foot away" as the metric and determined that
"average eyesight" could resolve 286 PPI. "Perfect eyesight" would bump it to
477 PPI.

[http://blogs.discovermagazine.com/badastronomy/2010/06/10/re...](http://blogs.discovermagazine.com/badastronomy/2010/06/10/resolving-
the-iphone-resolution/)

~~~
Keyframe
I remember that 800 number from one of the books about graphics and rendering.
Forgot which one, probably Glassner's. So it might be more of a
theoretical/ultimate threshold than anything. Also, it's not about resolving
individual pixels but removing aliasing effects due to signal /picture
density.

------
psychometry
And with all this added screen real estate, you're still limited to 4
apps/row. Absurd.

------
higherpurpose
Oh god not another "Apple made the iPhone 3.5" which is the _perfect size_ "
type of post.

There's no brilliant magic golden ratio formula behind Apple choosing 1080p.
They simply wanted to choose a "regular" resolution for once, while still
being bigger than 326 PPI.

If 720p would've been more than 326 PPI for the 4.7" one, they would've chosen
that, too. The reason they didn't is because 720p is _less_ than 326 PPI, and
they didn't want to have 1,000 headlines out there say how "iPhone 6 has less
pixel density than previous iPhones".

In my opinion they should've done that anyway, and end it with the stupid
resolutions that Apple keeps using just because they didn't have the foresight
to add resolution scaling early on to iOS, because they never imaged they
could be building any other mobile device that _isn 't_ 3.5" in size. They
messed up the "perfect scaling" for developers with 1080p on the Plus anyway.
They could've done it on the smaller one, too. It's silly that they didn't do
it.

~~~
retroencabulato
Did you even read the article?

