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

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 UTC