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

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.

Regards,
Maciej

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