Super User is a question and answer site for computer enthusiasts and power users. 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

I need to find out the position (x, y) and size (width, height) of a rectangle selection over an image, in as few steps as possible. This is because I need to repeat this manual process thousands of times.

For example With Preview, I can easily get the size of any selection but not the origin (or I don't how). If Preview's little back box also told me the origin of the selection my problem would be solved.

enter image description here

What can I use for this? If it's free, simple and/or comes with OS X, much better.

share|improve this question
up vote 3 down vote accepted

Assuming (0, 0) is the top left corner of the image, and you're using Preview:

Start your selection in its bottom right corner. Select to the top left corner and note the size (like in your screenshot).

Then press Escape to deselect, and click to start a new selection at the location that was the top left corner before. Drag it to the top left corner of the image. You don't need to be precise, the numbers won't change when you select an area not part of the image.

If you need to restore the selection for any reason, execute the steps I described in reverse, starting beyond the top left image border, find the location of the selection's top left corner, and then select it again.

Of course, you could just use e.g. an image editor that supports this feature, like Pixelmator (View » Show Info Bar):

enter image description here

The advantage is that it fits in a screenshot, and you don't need to change the selection.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .