http://onionworks.net/2006/imageservice

setPixel (workspace : nodeset, x : number, y : number, color : nodeset) : void

With this method, a colour value can be allocated to a pixel in a workspace. The parameters “workspace”, “x”, “y” and “colour” are transferred to the method. The workspace to be worked on is to be transferred to the parameter “workspace”. The coordinates of the pixel are to be transferred to the parameters “x” and “y” and the colour created with the method “createColor” transferred to the parameter “color”.

In the following example, the colour “white” is allocated to the pixel at the position (100,100).

<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:variable name="workspace" select="is:createWorkspace(@src)" />
<xsl:variable name="pixel" select="is:setPixel($workspace,100,100,is:createColor(255,255,255))" />
<xsl:variable name="doWrite" select="is:writeWorkspace($workspace, ise:createJpegEncoder(100))" />
<b:output mimeType="image/jpeg">
<b:webResponse expires="60" />
</b:output>
</xsl:template>
</xsl:stylesheet>