Image pixel coordinates
<p>I'm using PHP and ImageMagick to read colors from an image's edge. </p>

<pre><code>$x = 1;
$y = 1;
$pixel = $image-&gt;getImagePixelColor($x, $y);
$colors = $pixel-&gt;getColor(); // rgba
</code></pre>

<p>But I don't quite get how the coordinates work. So I created this 4px png.</p>

<p><a href="https://i.stack.imgur.com/RAx7l.png" rel="nofollow"><img src="https://i.stack.imgur.com/RAx7l.png" alt="enter image description here"></a></p>

<p><code>1,1</code> gives <code>rgba(0,30,255,0)</code> instead of the transparent pixel. Also, what if I select a large range of pixels?</p>