tool to get coordinates of an image pixel

androidnewbie picture androidnewbie · Oct 11, 2012 · Viewed 83.1k times · Source

I need a tool using which,when i point the mouse at a particular location of an image,it should give me location of the pixel relative to the image.for ex.i have a 720x480 image,my pointer is somewhere on the image,then the tool should tell me it is x pixels from left and y pixels from the top i.e coordinates of the pixel.Please help!Thanks in advance!

Answer

fabien picture fabien · Oct 11, 2012

In photoshop, the information pannel give you that. I'm pretty sure it's also possible in Gimp.

Or you can make your own tool ! I made you a small example in jsfiddle : http://jsfiddle.net/zz3Rh/19/

The html :

<div id="image">image</div>
    coordinates :
<div id="coordinates">0</div>​

The css :

#image{ height:350px; background:#c00;}​

The js (with jquery loaded) :

$(function(){
    $(document).mousemove(function(e){
        $('#coordinates').html('x: ' + e.pageX + ' y : ' + e.pageY);
    });
})

BECAUSE WEBTOOLS ARE THE FUTURE !!!! :) (and because this is a forum for developpers)