W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [css3-images] What does image-resolution apply to?

From: Alan Gresley <alan@css-class.com>
Date: Wed, 25 May 2011 02:58:01 +1000
Message-ID: <4DDBE399.1090406@css-class.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>, MURAKAMI Shinyu <murakami@antenna.co.jp>
On 25/05/2011 2:42 AM, Tab Atkins Jr. wrote:
> On Tue, May 24, 2011 at 7:24 AM, Brad Kemper<brad.kemper@gmail.com>

>> This is also a question about background size. Suppose that with
>> that same 400 x 400 raster image I have { background-image:
>> image('400x400.png' 10dpi); background-size: 1in 1in; }? What are
>> the final sizes of the rendered image pixels? 1/10" or 1/400"?
>> Perhaps in both cases, you are just adjusting a sort of "late
>> intrinsic" resolution that is then overridden by width and height
>> declarations? If so, I think you need to say so. (Apologies, if you
>> do somewhere already, and I just missed it.)
> I don't think it's clearly stated how this works, so I should fix
> that.  The intent is that it affects the intrinsic size.
> So, in your first example (400x400 pixel image at 72dpi, sized to
> 1in by 1in), you first apply the resolution.  This gives you a
> native image size of 533px (or 5.55in), which is then scaled down to
> 1in by 1in.  Your second example is similar, though more extreme
> given the tiny dpi.
> ~TJ

What happens with a SVG background-image that has no intrinsic size or 
no dimension?

background-image: image('basic.svg' 50dpi)

Alan Gresley
Received on Tuesday, 24 May 2011 16:58:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC