Thu, 31 Mar 2011 10:04:43 -0600 Jason Creighton <jcreigh@...400...> kirjoitti:
I just want to make sure I understand roughly what this one would entail. As I understand it, we're talking about supporting the linearRGB colorspace as described here:
http://www.w3.org/TR/SVG/painting.html#RenderingProperties
throughout the filter stack. If I read the standard correctly, the "color-interpolation-filters" property applies to filter primitives, which I think means that you could have one primitive using sRGB and another using linearRGB in the same filter.
This would seem to require that each bitmap in the filtering chain gets tagged with what its colorspace is, with conversions being done as needed before each filter primitive is applied. Hopefully the common case would be either sRGB or linearRGB being used in the entire filter, but we'd have to support the general case.
Is that basically right?
Seems correct, yes. Implementing the color-interpolation-filters would probably include extending src/display/nr-filter-slot.{cpp,h} which does somewhat similar bitmap conversions already (though for orientation, not colour spaces).
For good results even more work may be needed than it seems. As it stands, filter primitives operate on ordinary 8-bits-per-channel RGBA images. Converting such image from sRGB to linear, filtering and converting back to sRGB will lose quite a bit of colour information. This could result in things like banding. The fix would be to use higher colour depth for the intermediate images (there are other reasons to do this, too).
Just a note so you'll know what to expect. It's totally not meant to say that your plan for GSOC needs to include fix for this problem.