W3C home > Mailing lists > Public > www-svg@w3.org > October 2007

Re: What does the line in feDisplacementMap about color-interpolation filters not applying to in mean?

From: Anthony Grasso <anthony.grasso@cisra.canon.com.au>
Date: Thu, 11 Oct 2007 22:43:01 +1000
Message-ID: <470E1A55.5080304@cisra.canon.com.au>
To: Robert Longson <longsonr@gmail.com>
CC: www-svg@w3.org

Hi Robert,

This is the official response of the SVG WG. My apologies for not 
officially responding sooner.

Please see my comments below.

Robert Longson wrote:
> In http://www.w3.org/TR/SVG/filters.html#feDisplacementMap there is a line
> 
> The 'color-interpolation-filters'  property only applies to the in2
> source image and does not apply to the in source image.
> 
> I'm not really sure what this means.
> 
> In gecko we've implemented filters by creating an sRGB bitmap of the
> original drawing which we then apply the filters to. Each filter
> converts its input bitmap(s) to either LinearRGB or sRGB depending on
> the value of color-interpolation-filters and then processes the output
> to an output bitmap in the same colour space as its converted input.
> The final output is then converted back to sRGB if necessary for
> display.
> 
> For feDisplacement map we can convert the in2 source image before we
> work on it but what are we supposed to do with the in source image?
> 
> a) Always convert in to LinearRGB (or sRGB)
> b) Convert it based on color-interpolation rather than
> color-interpolation-filters
> c) Leave it as whatever it happens to be.
> 

After discussions about how color-interpolation-filters affects 
feDisplacmentMap the SVG Working Group have decided that the (in) source 
image must remain in its current color space (i.e. option c).

This clarification will appear in the SVG 1.2 Filters module. 
Additionally, we are working on issuing an SVG 1.1. Full errata item 
with this clarification.

> If c) then what happens if in and in2 are the same do we need two
> copies of the input surface, one for in2 which we convert based on
> color-displacement-filters and one for in which we don't. Also if in
> is the output of another filter is in whatever
> color-interpolation-filters was for that filter?
>

You are correct, if (in) and (in2) are the same you will need two copies 
of the image. Once you have two copies of the image you may then color 
convert (in2) to the color-interpolation-filters space if required.

With regards to the second part of your question, should (in) be the 
output result of a previous filter and color-interpolation-filters was 
specified for the previous filter, then (in) will be in the resultant 
color space of the previous filter (i.e. color space of 
color-interpolation-filters).

However, please note that the color-interpolation-filters property is 
not implicitly inherited between filter primitives.

We hope this response addresses your issue. If not, we are happy to
consider any other suggestions you may have. Thanks.

Kind Regards,

Anthony Grasso

> Best regards
> 
> Robert.
> 
> 
Received on Thursday, 11 October 2007 12:43:18 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:37 GMT