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!
Open your graphic in paint and move your cursor to the location of the coordinates you need. The x,y coordinates are displayed in the bottom left of the application screen. For my example, I placed my cursor over the top left corner of the read buttons and recorded the x,y coordinates Paint displayed.
To determine the values of one or more pixels in an image and return the values in a variable, use the impixel function. You can specify the pixels by passing their coordinates as input arguments or you can select the pixels interactively using a mouse.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With