W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] <img srcset> for responsive bitmapped content images

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 10 May 2012 13:18:41 -0700
Message-id: <ACC75170-0AD8-4D9A-B7E5-1322A4DBA044@apple.com>
To: Simon Pieters <simonp@opera.com>
Cc: whatwg@whatwg.org, "Tab Atkins Jr." <jackalmage@gmail.com>, Edward O'Connor <eoconnor@apple.com>

On May 10, 2012, at 6:47 AM, Simon Pieters <simonp@opera.com> wrote:

> On Thu, 10 May 2012 15:24:28 +0200, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> For two, I'm not sure that it's particularly obvious that when you say
>> "2x", you should make sure your image was saved as 196dpi.  You have
>> to already know what the default resolution is.  As well, I think that
>> values like 300dpi are pretty common, and they don't map to integral
>> 'x' values.  If people say "screw it" and use "3x", this'll be
>> slightly wrong and I think will cause ugly blurring.  If we make this
>> take <resolution>, people can just use the dpi unit.
> Can we just use CSS's 'dpi' instead?
> <img src="default.jpg" srcset="highres.jpg 300dpi">

CSS's 'dpi' is confusing, because it actually defines the ratio of device pixels to CSS inches, not device pixels to physical inches, as most users would expect 'dpi' to mean in the context of a graphics program. So 300dpi would mean the same thing as 3.125x, and would likely itself result in ugly blurring, since scaling by a fractional scale factor rarely looks crisp.

Received on Thursday, 10 May 2012 20:19:10 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:42 UTC