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="" xmlns:ise="" xmlns:is="" xmlns:b="" xmlns:onion="" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="/resource">
<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">
<b:webResponse expires="60" />