136 points · by orofino · 14y ago · 101 comments
Even more interesting is http://en.wikipedia.org/wiki/JPEG_2000, which has "truncatable" bitstreams. You can stop getting data at any point, and depending on the encoding choices, you'll just lose fidelity in colour, resolution etc. Encoders can reorder the bitstream to deliver whatever is most useful for the image first. Browsers could then just stop when "enough" has been downloaded to satisfy the demands of the device; high DPI devices would just continue to grab more of the bitstream. It's really useful for devices on low bandwidth links, as you start getting visual results with very little data.
JPEG 2000 hasn't been widely implemented outside of specialised devices, mostly because it's computationally heavy compared to JPEG, and the patent situation is unclear. Although this does mean that it could be implemented in a targeted way, designed to solve these problems (the spec for the entire format is huge). Moreover, one of the patent holders is, IIRC, Apple.
The idea truncatable bitstreams is fascinating too. I'm not well versed in networking, but wouldn't the latency of a mobile network kill the benefit of this technique? e.g, by the time the server receives the "connection closed" signal, a large part of the extra data would have been sent, no?
For JPEG 2000, the network characteristics are important, but I don't think it would be too bad on a mobile network. Low DPI devices might get a bit "too much", but it wouldn't be a problem - they can just throw it out (or incorporate more detail).
viewport-dpi - the dpi viewport-max - the maximum possible pixel dimension and possibly viewport-current - the pixel dimensions at the time of the request
Decent responsive design should deal with the differing viewport sizes, but it might be nice to get a hint before delivering your page what direction to weight that response in.
Our goal with retina.js was to make it zero-config: no markup changes, no extra element attributes or flags.
Then, we can support current image formats in the way you envision.
Also, anything you have vectorized should be in SVG format, including text in non-web fonts.
When $110 buys you 2TB (this morning on Newegg), then doing it on the fly and caching the result has about 100x better ROI than trying to solve it with a smart format. Remember, we're speaking about still photos here, where high retina quality ones rarely take more than 500k each, so 2TB buys you room for 4,000,000 photos (and since you'll be caching the lower res 200K images, it actually buys you room for 10,000,000 million photos)
That's not the case for videos - netflix, hulu and friends have multiple copies of each 1GB optimized for different devices. On-the-fly conversion is not possible, and the stream are significantly difference. For them, a reasonable, universally supported progressive video format will indeed make a huge difference
<meta img-x2-res="_x2" />
Encoding the image twice with a standardized addition to the filename is just an extra bit to add to the export macro. The image storage is irrelevant for most cases (assuming you compress appropriately); it's the bandwidth and request volume that's precious.I'd like to propose a new function for the Images module. This function will allow developers to provide, in a compact manner, multiple variants of the same image at differing resolutions. Using @media pushes the two asset references apart from one another, whereas such a function keeps related asset references together. It also helps keep selectors DRY. We've called it image-set(), and it takes one or more image specifiers.
https://plus.google.com/115203843155141445032/posts/BrrLGL5k...
-webkit-image-set( url(image.png) 1x, url(image@2x.png) 2x )
That's their notation. Imagine having to do that for every image ever, when they're all just filename + 2x resolution key + filename extension. Totally asinine. Developers should just be able to pick a single page-wide filename key for all their 2x assets, and the browser will know to look there.It's a high-DPI display. Lots of devices have it. Lets not attempt to pretend there's anything Apple-specific about that.
If people really hated Apple marketing, they probably should be ecstatic at the idea of one of their trademarks becoming genericized.
Two which surprised me were Ping Pong and Adrenaline.
(in fact, even more confusingly, most zip() functions don't interleave elements, like zippers do, but return a sequence of paired tuples - this, naturally, gives Zippers a bad name who wants their pants to pairwise join)
So in this sense, I would claim there is a clear technical difference between just higher-resolution screens (more pixels) and retina displays (same pixels but "better looking").
To me this virtualization of pixels seems like a good idea, since the majority of web pages assume pixels have certain DPI range. Operating systems like OSX treat pixels as floats anyway, so if you need subpixel accuracy, it's still possible.
"Retina" is just a marketing term for "pixels so small your eye can't distinguish them at a normal distance anymore".
[0] http://www.w3.org/TR/CSS21/syndata.html#length-units
See also http://inamidst.com/stuff/notes/csspx (been featured on HN some time ago)
Intel played a similar trick about 8 years ago with "Centrino". The advertising (for what was essentially just a 802.11b chipset with some added processor/chipset requirements) was so successful that many novice users got fooled into thnking that "Centrino" was wifi, and that all those other manufacturers were just cheap knockoffs of an Intel technology. It did great harm to the market.
Really? Both the claim that many users were "fooled" by the Centrino branding and that this hurt the market for Wi-Fi devices seem highly implausible to me. I don't think I heard anyone use the term "Centrino" outside of Intel PR and reporting thereupon, whereas Wi-Fi had made it into the vernacular at least a decade ago.
The only other trademark for the 802.11 series of standards that got any traction at all was Apple's AirPort, and even their OS calls it Wi-Fi now.
It's why we have brands and markets. So we can associate them with _something_ and move on from terms such as 486DX 33Mhz.
People want to buy an "iPads", not the Apple K48 tablet (the internal name for the first iPad.
... And when I bought a laptop in 2005, yes, I did buy a "Centrino" one because I knew the Intel Wifi chipset combination was compatible with Linux.
... And Intel put out some other requirements and called them "Ultrabooks".
Now, we still have a way to go before high ppi displays are ubiquitous, but there you have one example at least :)
That said, there is nothing gimmicky about the retina name. It's a device where distance to the display, resolution and screen size are such that someone with normal vision cannot distinguish between pixels.
High-PPI does not in any way pack the same information. It’s ambiguous and unclear.
The only thing that’s bad about retina is that Apple uses it like a trademark. I would love it if any company could call their HD TVs retina displays (because they are), but that’s not possible. Luckily everyone else is busy taking away that name from Apple (for example by naming their software like that).
It is a post-development sales pitch used to pitch as a differentiation the fact that Apple's naive scaling required them to grossly overshoot the mark. Competitive products already had excellent displays before Apple decided that they had no choice but catch up.
I would love it if any company could call their HD TVs retina displays
Why would you love it? "Retina" display is a misnomer -- unless the device is a fixed distance from my eyes, and it is specifically geared for my eyes specifically, it is horse shit to call it a retina display. It is ignorant marketbabble that lowers us all.
It’s a petty good approximate term that to my mind works perfectly well. Sure, things change depending on view distance but I guess nerds have to survive a term that’s not always exact. The horror!
That was an uninformed rant on your part. What are you suggesting as an alternative? High-PPI certainly does not work.
AC.Retina._devicePixelRatio = 2
new AC.Retina
you will see several requests such as: HEAD http://www.apple.com/home/images/ipad_title_2x.pngDepending on the data contract, the user experience when viewing their mobile phone bills might be affected negatively though.
Ideally, we'd have something that would deliver only the correct image to the correct device, the first time. I haven't seen a clean method for achieving that yet.
So I would be cautious of using this technique with huge images.
But we have so-called experts trying to lead the way now...
http://www.archer-group.com/2012/development/javascript-jque...
1. The image doesn't have a src attribute. This means if that script fails for any reason then none of the images on your site load.
2. You need to have width and height attributes on all of your images. This is a nightmare for both dynamically generated content and for responsive designs.
3. You need to have those two extra attributes on each of your image elements in order for it to work.
Our goal was to make retina.js zero-config. We wanted it to work on existing sites without any changes to the existing markup.
We had originally written it in JavaScript, but decided to use CoffeeScript simply because it's nicer to read and write.
That said, this is why CSS3 is so valuable, particularly when responsive websites have already complicated the process of building a website/app.