On Thu, 2012-07-12 at 00:25 +0930, Adrian Johnson wrote:
I have been working on an experimental branch of cairo that supports color management for the image and pdf surfaces. I'm currently trying to get Inkscape to use this API so I can test creating color managed PDF files. I'm not familiar with SVG or the Inkscape source and have some questions.
The SVG specification says that compositing can be performed in sRGB or linear RGB color space. I could not find where this is supported in Inkscape. For now I've set the PDF surface color space to sRGB.
What color space are gradients interpolated in? Are all gradient stops the same color space? In my patch I have assumed that all stops have the same color space and used this color space as the interpolation color space.
Can a color space be set for an image?
If anyone is interested the code is here: http://cgit.freedesktop.org/~ajohnson/
To simplify the implementation only RGB color spaces are currently supported.
Since no one more knowledgeable had answered: I believe (please correct me if I am wrong) that Inkscape only uses the sRGB color space. This is the default color space for everything in the SVG specification except for filters where linear RGB is the default space. The canned filters in Inkscape set the color space to sRGB so they are rendered the same by browsers, etc. Inkscape fails many of the W3C filter tests because they use the default linear RGB space.
Tav