W3C home > Mailing lists > Public > www-svg@w3.org > February 2008

Re: [Inkscape-devel] filter effect input and premultiplied alpha

From: MenTaLguY <mental@rydia.net>
Date: Mon, 11 Feb 2008 15:56:19 -0800
To: jf barraud <jf.barraud@gmail.com>
Cc: inkscape-devel <inkscape-devel@lists.sourceforge.net>, www-svg@w3.org
Message-ID: <fa877532fa2979a7ccd9615a5aae004c@localhost>

On Tue, 12 Feb 2008 00:44:57 +0100, "jf barraud" <jf.barraud@gmail.com> wrote:
> Hi all,
> Playing with feDisplacement map, and reading the code, I noticed filter
> effects recieve premultiplied images as input.
> I would expect non premultiplied images at least for filters that make
> explicit use of the color channels (like displacement map)...
> Is this the expected behaviour in svg? If not, I think the issue should be
> fixed before 0.46, since all art work based on this would be modified if
> we change this...

Section 15.7.1 of the SVG spec says:

Unless otherwise stated, all image filters operate on premultiplied RGBA samples. Filters which work more naturally on non-premultiplied data (feColorMatrix and feComponentTransfer) will temporarily undo and redo premultiplication as specified. All raster effect filtering operations take 1 to N input RGBA images, additional attributes as parameters, and produce a single output RGBA image.

Since section 15.15 (feDisplacementMap) does not otherwise explicitly specify, it comes down to an issue of whether or not feDisplacementMap is a filter which works more naturally on non-premultiplied data.  I assume that is the case (I believe that was Batik's interpretation, for example), but I think it should be clarified in the standard.

I've CCed the SVG mailing list for clarification on this.

Received on Monday, 11 February 2008 23:56:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:17 UTC