title: how to edit pixels and remove white background in a canvas image in html5 and javascript
body: <p>If I load an image, how can I loop through all its pixels and turn the white ones (or which ever color I specify) to be turned transparent?</p>
  
  <p>I have an idea on how to do this, but the looping process should be like a 2d array, so it would involve two for loops.</p>
  
  <p>I was thinking I would start on the top row first pixel, iterating to the right, if its a white pixel, then i turn it transparent, and move 1 pixel to the right, if its not white, then   I stop. Then in the same row, I start from the left most pixel, and check, if white, I turn it transparent, then move 1 pixel to the left, etc, etc...</p>
  
  <p>Then I move 1 row down and repeat the whole process..</p>
  
  <p>This way I don't remove any white pixels in the actual image.</p>