Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScreenshotCompare

ScreenshotCompare is a small Qt 5 desktop monitor that captures the primary screen, stores each capture locally, and shows how many pixels are unchanged from the preceding capture. Capture begins immediately when Start is pressed and repeats every 60 seconds until Stop is pressed.

Comparison metric

Images are normalized to 32-bit ARGB and must have identical dimensions. The displayed percentage is:

100 × (coordinates with exactly equal ARGB values) / (total coordinates)

The first capture is the baseline and is stored with 0.0 because it has no predecessor. Null images and size mismatches score 0.0. The metric is intentionally strict: a one-channel change makes that pixel different, and it does not compensate for scaling, movement, antialiasing, color profiles, or multiple displays.

Platform requirements

  • CMake 3.16+, a C++17 compiler, Qt 5 Core/Concurrent/Widgets/SQL, and the Qt SQLite driver.
  • Screen capture must be permitted by the desktop. Windows and X11 normally support Qt 5's whole-screen capture. Native Wayland compositors commonly block QScreen::grabWindow(0); macOS may require Screen Recording permission.
  • Only the current primary screen is captured. A failed or blocked capture is skipped.

On Ubuntu 24.04, install build-essential cmake ninja-build qtbase5-dev libqt5sql5-sqlite, then build and test:

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure
./build/bin/ScreenshotCompare

Tests use tiny QImage fixtures generated directly in source; they do not require real screen access.

Storage and privacy

Every successful capture is PNG-encoded into screenshots.db under Qt's per-user local application-data directory (typically ~/.local/share/ScreenshotCompare/ on Linux and %LOCALAPPDATA%\ScreenshotCompare\ on Windows). The database file is restricted to owner read/write permissions where the platform supports it.

Versions before 0.2 wrote screenshots.db in the process working directory. Move that file to the application-data directory if its history should be retained.

Captures may contain passwords, messages, notifications, or other sensitive content. Storage is not encrypted, synced, pruned, or deleted by the application, and the full history is loaded on startup. Stop the application when capture is not wanted and remove the database manually when the history is no longer needed.

Licensed under the MIT License.

About

Qt 5 desktop monitor for primary-screen capture and exact pixel-change history in local SQLite storage.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages