create image for pixel via javascript

send a pixel image via javascript (so onclick pixels)

var image = new Image();
image.src = 'http:rs.gwallet.comr1pixelx4915r'+Math.round(Math.random()*10000000);
image.onload = function(){
     after image loaded do something here
}