How to get the diagonal pixels in an image?
<p>I am using a code like this</p>

<pre><code>for row in range(height):
        for col in range(width):
</code></pre>

<p>By using this code I will get each pixel like<code>(0,0),(0,1),(0,2)</code> up to <code>(height,width)</code>. Now I wanted to get only the diagonal pixels so what code should I use?</p>