Color management
All color values embedded in SVG files and passed to SVG templates by way of substitution variables are assumed to exist in the sRgb
color space.
No color conversion is performed when images are embedded into the SVG. To ensure color fidelity, make sure to specify icc=sRgb
for all embedded image requests.
After rasterization, the SVG image participates in color management just like any other image.
Example
The following SVG template illustrates image references and use of variables.
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg width="500" height="500"> <image x="50" y="50" width="400" height="400" xlink:href="/is/image?src=$img$&wid=300&hei=400"/> <text x="150" y="400" style="font-size:$pts$; fill:$color$"> Title: $txt$ </text> </svg>
This SVG template might be used as follows:
http://server/is/image/mySvgTemplate.svg?$txt=Svg%20Template%20Test&$img=myImage.tif&$color=red&$pts=40&qlt=95
Restrictions
SVG files must be stand-alone and must not reference any secondary files or resources, with the exception of external images referenced with Image Serving or Image Rendering requests (see above).
Only static content is rendered. Animation, interactive features, such as buttons, and so on. may be present but may not be rendered as expected.
ICC profile-based color specifications are not supported at this time.
<script>
elements may be present but are always ignored.