# ScreenQuickTake

**A command-line tool to take a screenshot on Windows. Written in plain C.**

## How to use it
Take a screenshot immediately:
```dos
screenshot_quick_take.exe
```
Sleep for specified number of seconds and take a screenshot. This is a infinite loop, you will have to kill the process manually:
```dos
screenshot_quick_take.exe <number of seconds>
```

## How to cross-compile the Windows executable on Linux (Red Hat, Fedora)
```bash
sudo dnf install mingw32-gcc mingw32-gcc-c++ cmake
cd sqt
mkdir build
cd build
mingw32-cmake ..
make
```

## Technical references
- [Capturing an Image](https://msdn.microsoft.com/en-us/library/windows/desktop/dd183402%28v=vs.85%29.aspx)
- [Single-file public domain libraries for C/C++](https://github.com/nothings/stb)
- [Command-line screenshot tool for Windows](https://blog.mozilla.org/ted/2009/02/05/command-line-screenshot-tool-for-windows/)

## ChangeLog

20201129:
 - Replaced GetSystemMetrics() with GetDeviceCaps() to get the correct screen size with DPI scaling.

20150501:
 - The first release.

#### Author: DarkRanger (https://darkranger.no-ip.org)
#### License: MIT License
