Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
Is there any way for a site author to 'opt-out' of this? Maybe something involving a media-dependent stylesheet or something.
Retina display support
Posted Jan 9, 2013 18:41 UTC (Wed) by Cyberax (✭ supporter ✭, #52523)
> Is there any way for a site author to 'opt-out' of this? Maybe something involving a media-dependent stylesheet or something.
Yup. There's semi-official "hi-def" selector for CSS. Lots of sites are using it: http://www.netmagazine.com/tutorials/master-css-pixels-re...
Posted Jan 9, 2013 21:40 UTC (Wed) by roc (subscriber, #30627)
For non-Retina-aware apps, MacOS just scales the entire window up by a factor of 2. Being Retina-aware means for things we can scale intelligently (text, vector graphics) we do much better. For images we usually can't do much better although at least we give the author some control (choosing between nearest-neighbour and bilinear scaling via the image-rendering CSS property).
Posted Jan 10, 2013 9:52 UTC (Thu) by epa (subscriber, #39769)
Posted Jan 10, 2013 13:08 UTC (Thu) by nye (guest, #51576)
>On a Retina screen, images have to be scaled up somehow.
This is obviously the root of the disagreement, because I don't think that's true *at all*.
Why bother with a high density screen in the first place if you're not going to use it?
I have here a number of displays, ranging from around 100ppi to around 250ppi. Looking at the same image on the lowest and highest density displays, it looks far better on the higher one when displayed at its native size. If that gets rescaled to make it the same *physical* size, the theoretical best case scenario is that it looks like it does on the low density display, except in practice the better display means that you can really see the deficiency of the scaling.
I recognise that there is a real problem to be solved here, where some genius has specified a text height of 12px and some background image to match (or whatever), but the solution given doesn't seem like a good one at all.
Posted Jan 10, 2013 13:29 UTC (Thu) by nye (guest, #51576)
To be more specific, when looking at the same image at the same physical size and distance on both screens, the difference is that the high resolution display looks blurred - this is with whatever scaler the Android browser uses.
I *hate* blurry visuals. They're tiring to look at because my eyes keep trying harder to focus until they've had a *long* time to get used to the knowledge that they simply can't; that's something that never happens in the physical world, so it makes an unpleasant transition between looking at a screen and looking at real physical objects.
Related: the default font smoothing settings on Ubuntu (picked that only because it's the only distro I've used recently with an out-of-the-box config - maybe others are different) looks like somebody took a stick of lard and smeared it over the monitor; it disgusts me, and it's uncomfortable to read. In this area at least, high PPI displays are a clear win regardless of how images are treated.
I can see that the image-doubling behaviour would be desirable if you value large images over sharp images, but that's a position I can't even begin to empathise with in any way because my eyes find it physically unpleasant.
Posted Jan 12, 2013 6:55 UTC (Sat) by alankila (subscriber, #47141)
Interpolation filters produce errors when encountering high-frequency content of the image. These errors follow from ignored gamma correction (= scaled images tend to be too dark at high-frequency features) and modeling of image as infinitesimal points of specific color and intensity at particular points of a grid, rather than interpreting the image as an area-averaged sampling of an unknown light function. If you had a theory of the light function whose gridded area-average produced the current image, you would be able to resample such function to any resolution, and likely the results would be more natural too. In any case the upshot of the latter effect is reduction of contrast of high-frequency images. I studied the problem slightly here:
Much more work should be done to turn this into something practical, though.
Posted Jan 12, 2013 19:02 UTC (Sat) by jimparis (subscriber, #38647)
There's a really simple light function that produces the current image: solid colored squares, each exactly the size of the image's pixels. Which leads exactly to the "pixel-doubling scaling" you describe. You might manage to come up with an alternate light function that also fits, but there's no way of knowing that it's any more correct.
Posted Jan 13, 2013 0:22 UTC (Sun) by alankila (subscriber, #47141)
So it is my faith that we can do better than that, and not even try very hard; the trouble may be in the corner cases where it would appear that we do worse. For instance, over/undersaturation is a risk for edge enhancements that are somehow tangentially involved in algorithm like this. How would you represent color that has negative luminosity? You can't, so for some cases the algorithm would have to degrade naturally.
Posted Jan 14, 2013 7:59 UTC (Mon) by ekj (guest, #1524)
But we don't know that, generally speaking. (though we can attempt to detect it) Lots of images are the result of computation, they might be output from a graphing-library, for example.
What works well for a photo of a face, doesn't always work well for output from gnuplot.
Posted Jan 10, 2013 13:34 UTC (Thu) by mpr22 (subscriber, #60784)
Posted Jan 9, 2013 22:26 UTC (Wed) by redden0t8 (guest, #72783)
Even if all the browser did was plain pixel-doubling, you'd still end up with your image exactly as it would appear on a low-dpi monitor - the only reason it looks worse is because the rest of the screen is high res so the pixelation is more obvious.
Once you add in good anti-aliasing, IMHO even a low-dpi image scaled up on a hi-dpi display looks better than the same low-dpi image displayed natively on a low-dpi display.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds