Skip to content
Methodology

How OnSpec verifies every passport and visa photo

Every check runs locally in your browser using deterministic geometric, photometric, and segmentation checks mapped directly to published government specifications. Your image bytes never leave your device.

1. On-device inspection pipeline

  • Face & landmark geometry: Locates eyes, chin, nose bridge, and head crown locally in WebAssembly to measure head height ratio, eye-line elevation, horizontal centering, and head tilt (roll, pitch, and yaw) against each document's exact millimeter and percentage tolerances.
  • Background segmentation & replacement: Separates the foreground portrait from the wall behind you and fills the exact compliant background tone required by the target country (plain white/off-white for US and China specs; plain light grey for Schengen and UK specs) without altering facial features.
  • Photometric & image quality checks: Measures focus sharpness, exposure clipping, left-to-right facial lighting balance, glare near the eyes, neutral expression, and minimum pixel resolution before any download is offered.
  • Exact physical print & digital export: Encodes exact pixel dimensions and 300 DPI JFIF metadata for 4x6 inch print sheets with calibrated cut guides so printed photos match required millimeter dimensions at 100% scale.

2. What software can and cannot verify

Automated checks verify geometry, sharpness, lighting balance, background uniformity, open eyes, and neutral expression. Some rules cannot be verified from pixels alone—such as whether a photo was taken within the last six months or whether a head covering is worn daily for religious reasons. OnSpec clearly separates measured rules from self-attested rules on every result screen.

3. Primary government and international standards

Every dimension, head-height band, eye-line target, and background rule in OnSpec is transcribed from primary official publications and pinned in automated specification tests. See our complete dated ledger on the official sources page. Key primary standards include:

4. Spec review cadence and privacy verification

Every document specification carries a verified “as of” date displayed on its page. You can independently verify that zero photo bytes leave your browser using the live network counter on our privacy panel or your browser's built-in DevTools Network tab.