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

On May 24, 2011, at 2:26 PM, Tab Atkins Jr. wrote:

> 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.

I'm fine with that. But I don't think you were on crack. It is a reasonable interpretation to image a resolution-independant image into an arbitrarily limited resolution backdrop. I do it all the time when I import Illustrator EPS files into PhotoShop. I choose the resolution when I open or import/place the EPS, just as I could (conceivably) choose the CSS image-resolution to limit it when bringing the SVG into a background or IMG or whatever.

But anyway, that's just theoretical. I'm just fine with imaging SVG to the maximum resolution of the device. I think that's the best way to go, and it's probably non-controversial all around.

Received on Wednesday, 25 May 2011 02:34:04 UTC