Get pixel from bitmap?

Var data = context. GetImageData(0, 0, canvas. Height, canvas.

Width); var count = 0; var tmr = null; var length = data. Length; (pix = function() { var r = datacount + 0; var g = datacount + 1; var be = datacount + 2; var a = datacount + 3; var rgba = 'rgba(' + r + ' ,' + g + ' ,' + be + ' ,' + a + ')'; console. Log(rgba); if((count += 4) >= length) { clearTimeout(tmr); return; } tmr = setTimeout(pix, 1000/30); //at 30 fps })().

And what is this (x=function(){})();-structure called, so I can learn some more about it (google is not so good with parens/braces). I won't mark it as answer yet, because even with 300fps this takes almost 1h. I have to test the other answer first.

– fruight Nov 11 '10 at 20:38 also, your code is bugged: it prints 4bytes, but only advances 1byte, so the outputs overlap 3bytes, and the last 3 outputs will have the last values 'undefined', and its data.data.... – fruight Nov 11 '10 at 20:51 yes dude, it's buggy I admit that.. I had answered it when I'm bit sleepy :) Updated my post. Please have a look at my update. Have a Nice Day!

– Avinash Nov 12 '10 at 1:37 (x=function(){})(); it's a self executing anonymous function, which initiates the function. Coming to frame rate *30fps* , you can atleast the Image Data Details Instead of hanging up your browser. Well I won't beg you to accept my answer, 'cause I don't get anything, If my answer is accepted or even downvoted :) BTW welcome to stackoverflow.

Com – Avinash Nov 12 '10 at 1:42 it solves the freezing, but I figured that if I don't dump to console the performance is good enough to do all calculations directly without freezing. – fruight Nov 17 '10 at 3:35.

Try creating a canvas of 1px X 1px, move the image and then read the imageData.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions