http://onionworks.net/2006/imageservice
getColorFromPosition (target : xlink, [fromDataSource : boolean], x : number, y : number) : nodeset
This method enables the colour of a pixel to be read out from an existing picture. The picture source is specified by the parameter “target”. If a picture is not read from the data source, but loaded from a binary method via an xlink, then the parameter “fromDataSource” must be set to the value “false()”. If the picture is read from a data source however, then the parameter “fromDataSource” can be omitted, since it is set to the value “true()” by default.
The following example reads the colour of a picture from the data source at the position (100,100)
<xsl:variable name="color" select="is:getColorFromPosition(@src,100,100)" />
The return value of the method corresponds to the return value of the method “createColor” and can be treated like a colour.
Example return value of the method:
<color red="112" cssValue="#706800" green="104" blue="0" alpha="255" />