Freeze your screen, mark regions, get pixel-exact coordinates and crops
Rectangles, ellipses, triangles, N-gons, freehand — rotate, label, verify, regenerate
Every screen tool that measures pixels ends at a human's eyeball: a ruler shows you a number, a screenshot app draws an arrow, a mouse tracker prints a position you copy by hand. pixelcoords starts from a different premise — the real consumer of a coordinate is a machine.
What happens in this demo
A private browser window on the Google homepage is frozen by pixelcoords with an amber outline marking the targeted window. Four shapes are drawn over the page — a rectangle, an ellipse, a triangle, and a hexagon — in committed green, then a freehand region in preview blue with the live coordinate chip showing its position and size. The control panel lists every key. The session is saved, and the demo ends on the resulting session.json open in a browser: schema, monitors, target window, and one record per marked selection.
Sixty seconds
pixelcoords # screen freezes; drag shapes, A labels, S saves
# → Downloads/pixelcoords-captures/<timestamp>/
# session.json screenshot-0.png cutout-primary-0.png cutout-inverse-0.png crop-0-submit.png
pixelcoords assert --session <dir> --point 812,440 --label submit
# exit 0: that point is inside the region you labeled "submit"
pixelcoords emit --session <dir> --format pyautogui
# ready-to-paste click code, coordinate conventions already handled
pixelcoords find --session <dir>
# the UI moved? every region re-located by its saved crop, deltas included
pixelcoords resume # pick any saved session, keep editing itThe tool is a loop
pixelcoordsFreeze, mark, save a session.
{ "schema": 1,
"selections": [{ "shape": "rect", "label": "submit",
"px": { "x": 812, "y": 440, "w": 96, "h": 40 } }] }pixelcoords assert --point 812,440 --label submitScore points against it. The exit code is the API: 0 hit, 1 miss, 2 malformed.
{ "hit": true, "space": "global" } # exit 0pixelcoords emit --format pyautoguiClick code in the target tool’s own coordinate convention.
pyautogui.click(812, 460) # submit
pixelcoords findThe UI drifted? Every region re-located by its saved crop.
{ "found": true, "score": 0.998,
"delta": { "dx": 0, "dy": -120 } }pixelcoords resumeReopen any session and keep editing; saves update it in place.
session.json screenshot-0.png crop-0-submit.png → editable again
What a save writes
pixelcoords-captures/20260728-182121-117/
├── session.json # versioned schema: three coordinate spaces, DPI scale
├── screenshot-0.png # one full frozen capture per monitor
├── cutout-primary-0.png # the frame with only the selections visible
├── cutout-inverse-0.png # the exact complement: selections punched out
└── crop-0-submit.png # one labeled crop per selectionCrops isolate each region; the cutout pair keeps every region in place on transparency — together they reassemble the screenshot. Files pixelcoords didn't write are never touched.
Where it stands
| Feature | pixelcoords | PowerToys Screen Ruler | PixelSnap 2 | SikuliX |
|---|---|---|---|---|
| Price | Free | Free | $39 one-time | Free |
| Platforms | macOS · Windows · Linux | Windows only | macOS only | macOS · Windows · Linux (JVM)requires Java; development archived, continued by the OculiX fork |
| What you get out | session.json + labeled crops + cutouts + click codephysical-pixel coordinates in three spaces, per-monitor DPI scale | On-screen measurement; copies a number | On-screen measurements; screenshots with dimensionsits edge-snapping while measuring is genuinely excellent | Automation scripts that act on the screen |
| Live on-screen measuring | not offered | Yes — measures the live screen | Yes — live edge-snapped measuring | Watches the live screen continuously |
| OCR | not offered | not offered | not offered | Built in (Tesseract) |
| Point verification | assert — exit codes for CI and agents | not offered | not offered | In-script image matching |
| Re-location after UI drift | find — template re-location with deltas | not offered | not offered | Continuous visual search |
| License | MIT, open source | MIT (PowerToys), open source | Proprietary | MIT, open source |
Non-goals
Knowing what a tool is means knowing what it isn't. These are settled:
- OCR— text extraction is a different product
- Live (unfrozen) measurement— the freeze is the thesis
- Annotation— arrows and blur are a screenshot editor's job
- Recording / GIF capture— the product is the frozen instant, not the timeline
- Cloud, accounts, sharing— offline by design, permanently
Platform status
| macOS | Supported — primary development platform |
|---|---|
| Windows | Supported — verified by hand on Windows 11 |
| Linux (X11) | Supported — verified by hand on GNOME 46; every feature works |
| Linux (Wayland) | Screen coordinates + --pick window marking — verified by hand on GNOME 46; no windows / --target (the protocol withholds window geometry) |
Multi-monitor and mixed-DPI layouts are exercised by tests but not yet verified on real hardware. This table is kept honest — claims match runs.
Two ways in
cargo install pixelcoordsOr skip the toolchain: prebuilt binaries for macOS, Windows, and Linux — download, unpack, run.
Rust 1.88+ for the cargo route. On Linux, build dependencies first:
sudo apt-get install -y libxcb1-dev libxcb-randr0-dev libpipewire-0.3-dev \
libclang-dev libegl1-mesa-dev libgbm-dev pkg-configmacOS asks for Screen Recording permission on first run.
No account, no network, no toolkit — one small native binary for macOS, Windows, and Linux. MIT-licensed, because the aim was to build the best tool in this category and give it away.