Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uiur/node-screencapture
Take a screenshot of your desktop.
https://github.com/uiur/node-screencapture
Last synced: 2 months ago
JSON representation
Take a screenshot of your desktop.
- Host: GitHub
- URL: https://github.com/uiur/node-screencapture
- Owner: uiur
- Created: 2014-05-21T14:51:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T21:09:28.000Z (over 6 years ago)
- Last Synced: 2024-10-12T19:29:54.948Z (3 months ago)
- Language: JavaScript
- Size: 51.8 KB
- Stars: 47
- Watchers: 5
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-screencapture
[![Build Status](https://travis-ci.org/uiureo/node-screencapture.svg)](https://travis-ci.org/uiureo/node-screencapture)Take a screenshot of your desktop interactively.
Available in OSX, Linux, FreeBSD and Windows.
``` javascript
var screencapture = require('screencapture')screencapture(function (err, imagePath) {
// then you have imagePath as png.
//
// When an user exits screencapture without taking a screenshot,
// imagePath == null
})
```You can specify an output file path.
``` javascript
screencapture('/path/to/output.png', function (err, imagePath) {
// imagePath is '/path/to/output.png' or null
})
```You can use env named `CAPTURE_COMMAND` for capture.
This is formatted with `%s` for file path; `CAPTURE_COMMAND="shutter -s -e -o %s"`.## Installation
```
npm install -g screencapture
```In Linux, you need to install imagemagick.