Check to see if pixel is black on HTML5 Canvas
<p>I'm trying to find if a pixel is black or not on a canvas</p>

<pre><code>    var check = function(player,keyPressed) {
//series of ifs to determine what pixel to check. 
    }
</code></pre>

<p>I would need to return either true or false if the pixel is false, I've tried getImageData but I wasn't able to figure out how to use it properly. </p>