screenshot-window-js

1.0.0 • Public • Published

screenshot-window-js

Node.js package using .NET and Edge.js to take screenshot of a given window.

Example

Take a screenshot of a specific window and save it to a file:

const fs = require("fs");
const screenshotWindow = require("screenshot-window");
 
screenshotWindow("Example Window").then((image) => {
    fs.writeFileSync("example-window.png", image);
});

Take a screenshot of the foreground window and save it to a file:

const fs = require("fs");
const screenshotWindow = require("screenshot-window");
 
screenshotWindow("").then((image) => {
    fs.writeFileSync("foreground.png", image);
});

TODO

  • Separate the C# code into a separate project and add more options to how windows are searched for, and compile into a dll to improve use with Edge.js.

Readme

Keywords

Package Sidebar

Install

npm i screenshot-window-js

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • aelexe