Re: [fxtf-drafts] [filter-effects-1] Scale image before or after filter() is applied? (#399)

My first instinct was definitely concern that this approach muddies the “a filter function returns an image” data model, but on reflection I think it works.  We already have things like SVG images and gradients which can't actually be rendered until we know what size they are going to be drawn at. So this would be similar: the filter function returns a vector image consisting of an embedded image file, plus a size-dependent filter operation.

I do agree that this makes things much simpler for authors, especially for cases like border image where you may have different scaling factors for different parts of the image, or along different axes.

It's also worth considering whether the “image with filtering instructions” approach could be extended to interact with image tiling (so the image is tiled and then blurred — or at least blurred after the browser knows how it is going to be tiled & can make the correct adjustments). This would simplify the currently spec'd version which requires a blur in a filter function to behave differently than the blur elsewhere. (Note, however, that this part definitely _would_ muddy up the separation between the image and the context in which it is used.)


-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/399#issuecomment-628702611 using your GitHub account

Received on Thursday, 14 May 2020 15:16:16 UTC