I have the following code snippet:
Code :
var texture = gl.createTexture();
texture.image = new Image();
texture.image.onload = function() { 
     .... // I want to read the pixels once the image has been loaded
};
texture.image.src = urlImage;
I'd like to get the image pixels once it has been loaded.

Is it possible? If so, what's the best to do it?

Thanks in advance for your help.