Skip to content

[filter-effects] Specify rounding behaviour of feMorphology radius attribute #3619

Open
@BigBadaboom

Description

@BigBadaboom

https://www.w3.org/TR/filter-effects/#element-attrdef-femorphology-radius

The radius attribute determines the size (row and column count) of a convolution kernel. Obviously this eventually has to be rounded to an integer to create the matrix. However the spec does not say what the rounding method is.

Testing this, it appears that FF always rounds up, and Webkit always rounds down. So, for example 0.4 becomes 0 on Chrome (disabling the filter) and 1 on Firefox (filter works).

I believe it would be a good idea to add a note to this section formalising the rounding method. If you are familiar with convolutions, it is obvious that only integers should be used, but that is not obvious to the average person.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions