Functions / imageData getPixel
getPixel(x, y)
getPixel(float x, float y)

getPixel(float x, float y)
return: array 'color'
color[0]=red, color[1]=green, color[2]=blue, color[3]=alpha.
Code
<script type="text/javascript">
	function onload_1(idCanvas)
	{
		var img=new Image();
		img.src="/data/images/logo.png";
		img.onload=function(){
		var canvas=jc.canvas(idCanvas).start();
		jc.image(img,100,100);
		canvas.frame();
		var imgData=jc.imageData(100,100)
			.getData(100,100,100,100);
		var oldrgb=[];
		var rgb=[];
		for(var i=0;i<100;i++)
		for(var j=0;j<100;j++)
		{	
			oldrgb=imgData.getPixel(i,j);
			rgb[0]=255-oldrgb[0];
			rgb[1]=255-oldrgb[1];
			rgb[2]=255-oldrgb[2];
imgData.setPixel(i,j,'rgb('+rgb[0]+','+rgb[1]+','+rgb[2]+')');
		}
		imgData.putData(20,20);
		canvas.frame();
		}
	}
</script>
<canvas id="canvas_1" width="250px" height="265px"></canvas>
View