Re: feImage image sizing

On Thu, Mar 6, 2008 at 11:42 PM, Erik Dahlström <ed@opera.com> wrote:

> On Wed, 05 Mar 2008 09:17:43 +0100, Robert O'Callahan
> <robert@ocallahan.org> wrote:
>
> > http://www.w3.org/TR/SVG/filters.html#feImage
> >
> > If the xlink:href references a stand-alone image resource such as a
> JPEG,
> >> PNG or SVG file, then the image resource is rendered according to the
> >> behavior of the
> >> 'image'<http://www.w3.org/TR/SVG/struct.html#ImageElement>element
> >>
> >
> > For the <image> element, 'width' and 'height' are required attributes
> > that
> > define the size of the viewport into which the image is rendered.
> > <feImage>
> > doesn't have these attributes, so how should the image viewport be
> > sized? If
> > the image viewport is supposed to be (0,0)-(100%,100%) of the user
> > coordinate system established by the value of 'primitiveUnits' on the
> > 'filter' element, I think the spec needs to be clarified to say so
> > explicitly.
>
> Actually, <feImage> have 'x', 'y', 'width' and 'height' attributes since
> those describe the filter primitive subregion[1]. Even if not specified on
> the <feImage>, these attributes take their defaults from the <filter>
> element so that the filter primitive subregion is always defined.
>

But there is nothing that says to use the filter primitive subregion when
the 'width' and 'height' attributes are not present, is there?

Anyway, assuming you're right, then the text "In either case, the current
user coordinate system depends on the value of attribute
primitiveUnits<http://www.w3.org/TR/SVG/filters.html#FilterElementPrimitiveUnitsAttribute>on
the
'filter' <http://www.w3.org/TR/SVG/filters.html#FilterElement> element." is
misleading and should be modified. For the external image case, if the
viewport is established by the filter primitive subregion, then the user
coordinate system is irrelevant.

This introduces an odd difference in behaviour for external images vs
internal references. External images are transformed based on the filter
primitive subregion, internal references are only clipped by it.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Thursday, 6 March 2008 12:02:06 UTC