https://github.com/maisonsmd/qnx-quick-screenshot
A replacement for QNX's screenshot
https://github.com/maisonsmd/qnx-quick-screenshot
Last synced: 8 months ago
JSON representation
A replacement for QNX's screenshot
- Host: GitHub
- URL: https://github.com/maisonsmd/qnx-quick-screenshot
- Owner: maisonsmd
- Created: 2023-04-12T11:59:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-05-26T13:12:01.000Z (about 1 year ago)
- Last Synced: 2025-08-01T16:32:19.347Z (10 months ago)
- Language: C++
- Size: 268 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quick screenshot
This project works as a replacement for QNX's `screenshot`
The [`screenshot`](https://www.qnx.com/developers/docs/7.0.0/com.qnx.doc.screen/topic/manual/screenshot.html) command from QNX is slow & lacks of some features
## Feature
| Feature | [`screenshot`](https://www.qnx.com/developers/docs/7.0.0/com.qnx.doc.screen/topic/manual/screenshot.html) | `quick screenshot` |
|--------------------------------------|------------|----------|
| Capture any display | ✅ | ✅ |
| Capture any area of the screen | ❌ | ✅ |
| Support PNG | ❌ | ✅ |
## Performance
| | [`screenshot`](https://www.qnx.com/developers/docs/7.0.0/com.qnx.doc.screen/topic/manual/screenshot.html) | `quick screenshot` |
|--------------------------------------|------------|----------|
| Full screen capture time (1920x1080) | ~1.47s | **~0.10s** (14.7 times faster) |
## Usage
Using prebuilt binary `betterss`
Full screen capture:
```shell
./betterss
```
### Capture any area:
```shell
./betterss x=100 y=100 w=200 h=200
```
`x y w h` are optional
The images are saved under `/var/tmp`
### Specify output path
```shell
./betterss file=/var/screenshot/image_name
```
The file extension `.bmp` will be concatenated
Note: for custom locations, the path must exists (I didn't do the `mkdir`)
### Export as PNG
```shell
./betterss type=png
```
Encoder: [`fpng`](https://github.com/richgel999/fpng)
### Capture another display
`betterss` allow capturing any display attached (like Cluster virtual display, lower blade,...)
```shell
./betterss display=index
```
- `index`: the index of the display, might be `0`, `1`, `2`,...
You have to try each index to find the desired display
## Build
Firstly, setup your build enviroment (QNX compiler,...)
Then `cd` to project directory:
```shell
cmake .
make
```