1.2.1 • Published 7 years ago

screenshot-node v1.2.1

Weekly downloads
17
License
MIT
Repository
github
Last release
7 years ago

screenshot-node npm

Takes a screenshot of selected area and saves it to disk.

Linux, OS X and Windows all supported now.

Instalation

$ npm install screenshot-node

Methods

call the module

var screenshot = require('screenshot-node');

screenshot.saveScreenshot(x, y, width, height, path, callback)

x, y

Must be whole numbers.

The x and y coordinates for the top left corner of the picture.

width, height

Must be whole numbers.

The width and height of the screenshot in pixels.

Set width and height as 0 to take a fullscreen screenshot

path

Must be a string

The path including name of the file you want the screenshot to be saved as.

callback(err)

A string with error message. Null if there are no error.

example

Takes a screenshot from top left corner that have a width and height of 100. Saves it in the current directory with the name "image.png".

screenshot.saveScreenshot(0, 0, 100, 100, "image.png", (err) => {
    if(err) console.log(err);
}
1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago