http://onionworks.net/2006/imageservice
getPixel (workspace : nodeset, x : number, y : number) : nodeset
With this method, the colour of a certain pixel of a workspace can be determined. The syntax of the method can be seen in the following example. The used variable “workspace” contains the workspace from which the colour information is to be determined.
<xsl:variable name="pixelColor" select="is:getPixel($workspace,100,100)" />
In the following example, the “getPixel” method is used in order to determine the background colour of a newly created workspace.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ise="http://onionworks.net/2006/imageservice/encoders" xmlns:is="http://onionworks.net/2006/imageservice" xmlns:b="http://onionworks.net/2004/renderengine/binary" xmlns:onion="http://onionworks.net/2004/data" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="/resource">
</xsl:stylesheet><xsl:variable name="workspace" select="is:createWorkspace(@src)" />
<xsl:variable name="pixelColor" select="is:getPixel($workspace,101,200)" />
<xsl:variable name="workspace_neu" select="is:createWorkspace(200,200,'Pixel32bppBgr',$point)" />
<xsl:variable name="doWrite" select="is:writeWorkspace($workspace_neu, ise:createJpegEncoder(100))" />
<b:output mimeType="image/jpeg">
</xsl:template><b:webResponse expires="60" />
</b:output>