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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 24 May 2011 14:26:45 -0700
Message-ID: <BANLkTi=QgDxp3FPpfuwbb6kzL-D7q8_htQ@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Alan Gresley <alan@css-class.com>, www-style list <www-style@w3.org>, MURAKAMI Shinyu <murakami@antenna.co.jp>
On Tue, May 24, 2011 at 11:29 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, May 24, 2011 at 11:07 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On May 24, 2011, at 10:46 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>> On Tue, May 24, 2011 at 10:38 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>>>> On May 24, 2011, at 10:23 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>>>> For vector images, the "dot" in dpi is pixels in the outermost
>>>>> coordinate space.  So, that declaration simply means that the SVG's
>>>>> initial coordinate space is such that 1px in it is equal to 1/50th of
>>>>> an inch.
>>>>>
>>>>> In other words, if the SVG image had something like "<svg width='100'
>>>>> height='100'>" as the root element, then it would be scaled to be a
>>>>> 2in by 2in square.  Without that resolution declaration, the image
>>>>> would be just over 1in square instead.
>>>>
>>>> Are SVG lengths alway unitless numbers? If not, I would expect an SVG measured in inches to be pixelated if given a low enough resolution (which might occasionally be a useful effect).  Forgive my ignorance of SVG, please.
>>>
>>> No, they can be given as actual lengths, like "1in".  I'm not
>>> immediately certain how that would interact with resolution changes,
>>> though.  I suspect that's far enough down the unspecified road that
>>> it's up to the UA right now.
>>
>> That should be specified then, in your images module. Either SVG should be resolution-independant (using e resolution), or it can be locked down via a <resolution> value. I don't feel strongly one way or another, but it should be consistent.
>
> Yeah, I think I should bring this up in the FXTF so we can nail down
> exactly what behavior we want.

On further consideration, I was on crack when I wrote the above.  It
doesn't make any sense to tweak the resolution of vector images; they
are, by definition, infinite resolution.  I will instead define that
vector images are unaffected by resolution changes.

As you said, if you want to pixellate vector art, it should be done
via filters, or manually with <canvas> and element().

~TJ
Received on Tuesday, 24 May 2011 21:27:33 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT