Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any means of retrieving the current pixel coordinates within an image where the mouse cursor is?

(Failing this, are there any stock OS X tools that can easily do this?)

share|improve this question

You can do this simply by dragging from the desired pixel to the lower left corner of the screen. This will create a selection rectangle, and the size of that rectangle is shown in the screen. Since the rectangle can only stretch until it reaches the origin (the corner), its size will be the same as the pixel coordinates you're looking for.

share|improve this answer

Not that I know of. The closest stock solution I personally use is to take activate the utility to take a screenshot of a screen portion (Command ⌘+Shift ⇧+4). The cursor will turn into a crosshair with the screen's horizontal and vertical pixel coordinates. You then have to apply some math to determine the distance between the end-points you want to measure. Not ideal, but better than nothing.

You can also try using xScope, a nice 3rd party utility which makes life a little bit easier with dedicated tools, but it is zoom agnostic, so make sure you measure at 100% zoom.

Photoshop is the only tool that effectively takes pixel distances regardless of the zoom level, but you have to open the image or at least a screenshot (if you take it from a website or PDF) in Photoshop.

share|improve this answer
I generally use Gimp for this task, although it is indeed also ill-suited for making a quick one-off calculation. – noffle Sep 24 '12 at 22:23
While in the crosshair-selection mode, while the mouse is moving, the coordinates are the size of the screenshot. For a second or so after the mouse pauses, the coordinates show the location on the screen of the crosshair. To get the coordinates in a window or image, start the selection box at the upper-left of the window or image. – CajunLuke Sep 26 '12 at 2:39

I needed something very similar (coordinates of bounding boxes around certain objects in image for computer vision research). I build a simple tool that runs in the browser:

share|improve this answer
This is maybe the best answer I ever read in my whole 15-year of reading advices on the net. congratulation ! – romain jouin May 17 at 21:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.