Objects / imageData
imageData(width, height)
imageData(float width, float height)
imageData(object imageData)
imageData(object parameters)

Create a jCanvaScript object to manage data of canvas. It works with special functions: setPixel, getPixel, getData and putData. For detail description of this functions look in functions menu.
imageData(float width, float height)
Create a new blank jCanvaScript ImageData object with the specified dimensions. All pixels are preset to transparent black, but you can change that with setPixel or getData functions (for detail description look in the Functions menu)
Code
<script type="text/javascript">
	function onload_1(idCanvas)
	{
		jc.start(idCanvas);
		var imgData=jc.imageData(100,100);
		for(var i=0;i<100;i++)
		for(var j=0;j<100;j++)
			imgData.setPixel(i,j,'rgb('+i+','+j+','+(i+j)+')');
		imgData.putData(100,100);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
imageData(object imageData)
Create a new blank jCanvaScript ImageData object with width and height like in the object specified by parameter. Its not make a copy of it! All pixels are preset to transparent black, but you can change that with setPixel or getData functions (for detail description look in the Functions menu)
Code
<script type="text/javascript">
	function onload_2(idCanvas)
	{
		jc.start(idCanvas);
		var imgData =jc.imageData(jc.imageData(70,70));
		for(var i=0;i<70;i++)
		for(var j=0;j<70;j++)
			imgData.setPixel(i,j,'rgba(0,0,0,'+(i/70)+')');
		imgData.putData(60,70);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_2" width="250px" height="265px">
</canvas>
View
imageData(object parameters)
Code
<script type="text/javascript">
	function onload_3(idCanvas)
	{
		jc.start(idCanvas);
		var imgData=jc.imageData({width:100,height:100});
		for(var i=0;i<100;i++)
		for(var j=0;j<100;j++)
			imgData.setPixel(i,j,'rgb('+(i+i)+','+(j+j)+','+(i+j)+')');
		imgData.putData(100,100);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_3" width="250px" height="265px">
</canvas>
View