feat: add display camera grid support

This commit is contained in:
goose
2026-10-01 15:21:32 -04:00
parent 515cf72594
commit 929e5a394c
11 changed files with 141 additions and 10 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ rm -f "$capture_path"
runner=()
if [[ -z "${DISPLAY:-}" ]]; then
if command -v xvfb-run >/dev/null 2>&1; then
runner=(xvfb-run --auto-servernum --server-args="-screen 0 640x480x24")
runner=(xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24")
else
echo "visual check unavailable: DISPLAY is unset and xvfb-run is not installed" | tee "$log_path" >&2
exit 2
@@ -56,8 +56,8 @@ with open(path, "rb") as capture:
if signature != b"\x89PNG\r\n\x1a\n" or kind != b"IHDR" or len(data) != 13:
raise SystemExit("invalid PNG")
width, height = struct.unpack(">II", data[:8])
if width == 0 or height == 0:
raise SystemExit("empty PNG")
if (width, height) != (1280, 720):
raise SystemExit(f"expected 1280x720 PNG, got {width}x{height}")
print(f"visual capture: {path} ({width}x{height})")
PY
then