Pixel travelling problem in BMP C#
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6054486/exception-on-traveling-through-pixels-bmp-c">Exception on traveling through pixels BMP C#</a>  </p>
</blockquote>



<p>I have <code>BMP</code> image and used two loops to access its pixels </p>

<pre><code>for(int i=0;i&lt;BMP.Width;i++){

   for(int j=0;BMP.Height;j++){

      color=BMP.GetPixel(i,j);     

   }

}
</code></pre>

<p>My problem is using the above loops pixels are readed like 2nd in the bottom image but what im required is as 1st image </p>

<p><img src="http://i.stack.imgur.com/NjdrA.png" alt="enter image description here"></p>

<p>This what happening now </p>

<p><img src="http://i.stack.imgur.com/aT5vB.png" alt="enter image description here"></p>
