2.1.0 • Published 6 years ago
screenshot-windows v2.1.0
Screenshot Windows
Utility for taking screenshots on Windows.
Usage
const screenshotWindows = require('screenshot-windows');
const result = screenshotWindows(options);Options
filename ('screenshot.jpg')Absolute or relative path to save the screenshot. Supports .jpg, .jpeg or .png file extension.quality (80)JPEG encoding quality.widthWidth of the saved screenshot. Is automatically determined ifheightormaxSizeis supplied, otherwise defaults to the screen width.heightHeight of the saved screenshot. Is automatically determined ifwidthormaxSizeis supplied, otherwise defaults to the screen height.maxSizeThe maximum width or height of the screenshot. Can be used withoutwidthorheightto fit the screenshot in a bounding box.
Return value
An object containing all the settings applied for taking the screenshot, including an absolute path to the screenshot file.
{
filename: 'screenshot.jpg',
filenameAbsolute: 'C:\\Users\\Random\\screenshot-windows\\screenshot.jpg',
quality: 80,
width: 2560,
height: 1440
}