Retrieve image coordinates at mouse cursor in Preview.app

I want to measure the precise pixel coordinates within an image where the mouse cursor sits.

Are there stock OS X or third party tools that can easily do this?


You can do this simply by dragging from the desired pixel to the upper 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.


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: http://nicodjimenez.github.io/boxLabel/annotate.html


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.


Via this answer to a related question:

Preview (included in OSX): Select a Text Box then from Tools -> Show Inspector pick the 4th tab that has a little ruler icon. This gives coordinates with an upper-left origin.